{"id":13801900,"url":"https://github.com/MZachmann/LightLora_MicroPython","last_synced_at":"2025-05-13T12:32:05.274Z","repository":{"id":154208901,"uuid":"125261055","full_name":"MZachmann/LightLora_MicroPython","owner":"MZachmann","description":"Lightweight Interrupt-driven Semtech SX127x Library for MicroPython","archived":false,"fork":false,"pushed_at":"2018-09-22T16:30:15.000Z","size":20,"stargazers_count":21,"open_issues_count":1,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-22T12:33:20.316Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MZachmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-03-14T19:07:34.000Z","updated_at":"2023-08-11T08:24:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"b733f82b-b072-454b-a27d-03cf19fe5c00","html_url":"https://github.com/MZachmann/LightLora_MicroPython","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MZachmann%2FLightLora_MicroPython","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MZachmann%2FLightLora_MicroPython/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MZachmann%2FLightLora_MicroPython/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MZachmann%2FLightLora_MicroPython/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MZachmann","download_url":"https://codeload.github.com/MZachmann/LightLora_MicroPython/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225217889,"owners_count":17439712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T00:01:29.632Z","updated_at":"2024-11-18T17:30:29.674Z","avatar_url":"https://github.com/MZachmann.png","language":"Python","readme":"A MicroPython Library for Controlling a Semtech SX127x LoRa Chip\n---\nThis is yet another library for controlling an SX127x Semtech chip. This is entirely interrupt driven (transmit and receive) with callbacks.\n\nFor power usage, you can sleep the CPU while waiting for an interrupt during transmit and receive cycles.\n\nThere is a nearly exact copy of this library for Arduino here https://github.com/MZachmann/LightLora_Arduino\n\nInstallation\n--\nThe library (LightLora) folder can just be copied and used as-is in a project.\n\nUsage\n--\nDuring setup call \n```python\nfrom LightLora import lorautil\n\nlru = lorautil.LoraUtil()\n```\nDuring the loop you can\n```python\nif lru.isPacketAvailable():\n\tpkt = lru.readPacket()\n\tprint(pkt.msgTxt)\n...\ntxt = \"Hello World\"\nlru.sendPacket(0xff, 0x11, txt.encode()) # random dst, src at\n```\n\nThe packet definition is:\n```python\nclass LoraPacket:\n\tdef __init__(self):\n\t\tself.srcAddress = None\n\t\tself.dstAddress = None\n\t\tself.srcLineCount = None\n\t\tself.payLength = None\n\t\tself.msgTxt = None\n\t\tself.rssi = None\n\t\tself.snr = None\n```\n\nCustomization\n---\nThe ports for the LoRa device are set in spicontrol.py for now.\n\nThe `_doTransmit` and `_doReceive` methods in lorautil.LoraUtil are the callbacks on interrupt.\n\nChangelog:\nJul 3, 2018 -\n--\n* In lorarun.py (the example) make lr a global so comm options can be changed manually before calling doreader()\n* Add a synchronous send method in lorarun.py since the sendPacket method is now asynchronous\n* add reset, sleep, isPacketSent, and setFrequency methods to LoraUtil to mimic the Arduino implementation\n* add power_pin option to sx127x parameter set\n* use signal bandwidth as integer\n\n\n\n","funding_links":[],"categories":["Libraries"],"sub_categories":["Communications"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMZachmann%2FLightLora_MicroPython","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMZachmann%2FLightLora_MicroPython","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMZachmann%2FLightLora_MicroPython/lists"}