{"id":13801875,"url":"https://github.com/wybiral/micropython-lora","last_synced_at":"2026-01-23T14:32:09.970Z","repository":{"id":63715582,"uuid":"290031527","full_name":"wybiral/micropython-lora","owner":"wybiral","description":"MicroPython library for controlling a Semtech SX127x LoRa module over SPI.","archived":false,"fork":false,"pushed_at":"2023-04-19T16:11:14.000Z","size":8,"stargazers_count":47,"open_issues_count":4,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-13T12:49:14.210Z","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/wybiral.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,"dei":null}},"created_at":"2020-08-24T20:20:59.000Z","updated_at":"2025-05-04T17:32:35.000Z","dependencies_parsed_at":"2024-01-29T19:30:21.263Z","dependency_job_id":"1561142b-c866-48c3-8d3b-bf2bb2ba4f30","html_url":"https://github.com/wybiral/micropython-lora","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wybiral/micropython-lora","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wybiral%2Fmicropython-lora","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wybiral%2Fmicropython-lora/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wybiral%2Fmicropython-lora/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wybiral%2Fmicropython-lora/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wybiral","download_url":"https://codeload.github.com/wybiral/micropython-lora/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wybiral%2Fmicropython-lora/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28694287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T14:15:13.573Z","status":"ssl_error","status_checked_at":"2026-01-23T14:09:05.534Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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.078Z","updated_at":"2026-01-23T14:32:09.942Z","avatar_url":"https://github.com/wybiral.png","language":"Python","readme":"# micropython-lora\nMicroPython library for controlling a Semtech SX127x LoRa module over SPI.\n\nThe logic for the code came from [this module](https://github.com/Wei1234c/SX127x_driver_for_MicroPython_on_ESP8266) but was streamlined and rewritten to be more MicroPython-friendly.\n\n## Examples\n\n### Initialize\n\nThe module requires an SPI bus connected to the SX127x, one pin to be `cs` (chip select), and one to be the `rx` (receive IRQ).\n\n```\nlora = LoRa(\n    spi,\n    cs=Pin(CS, Pin.OUT),\n    rx=Pin(RX, Pin.IN),\n)\n```\n\n### Sending\n\nYou can send bytes or a string (which will be encoded to bytes). A ValueError exception will be raised if the message exceeds the allowed payload length. Currently this method blocks until the message is sent.\n\n```\nlora.send('Hello world!')\n```\n\n### Receiving\n\nReceiving is done by attaching a handler using `on_recv` and then calling `recv` to put the device in receive mode. Receive mode is non-blocking so other code can run after calling `recv` but if you call `send` afterward you will need to put the device back into receive mode again.\n\n```\ndef handler(x):\n    print(x)\n\nlora.on_recv(handler)\nlora.recv()\n```\n","funding_links":[],"categories":["Libraries"],"sub_categories":["Communications"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwybiral%2Fmicropython-lora","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwybiral%2Fmicropython-lora","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwybiral%2Fmicropython-lora/lists"}