{"id":48552232,"url":"https://github.com/timokoethe/sx1278","last_synced_at":"2026-04-08T09:01:23.077Z","repository":{"id":349540523,"uuid":"959169952","full_name":"timokoethe/SX1278","owner":"timokoethe","description":"MicroPython driver for the SX1278 LoRa module over SPI, built for Raspberry Pi Pico and Pico 2.","archived":false,"fork":false,"pushed_at":"2026-04-06T12:19:58.000Z","size":11,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-06T13:32:37.149Z","etag":null,"topics":["embedded","iot","long-range","lora","micropython","ra-01","raspberry-pi-pico","rp2040","rp2350","spi","sx1278","wireless"],"latest_commit_sha":null,"homepage":"","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/timokoethe.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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-02T11:31:41.000Z","updated_at":"2026-04-06T12:24:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/timokoethe/SX1278","commit_stats":null,"previous_names":["timokoethe/sx1278"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/timokoethe/SX1278","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timokoethe%2FSX1278","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timokoethe%2FSX1278/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timokoethe%2FSX1278/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timokoethe%2FSX1278/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timokoethe","download_url":"https://codeload.github.com/timokoethe/SX1278/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timokoethe%2FSX1278/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31547845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"online","status_checked_at":"2026-04-08T02:00:06.127Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["embedded","iot","long-range","lora","micropython","ra-01","raspberry-pi-pico","rp2040","rp2350","spi","sx1278","wireless"],"created_at":"2026-04-08T09:01:21.255Z","updated_at":"2026-04-08T09:01:22.840Z","avatar_url":"https://github.com/timokoethe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MicroPython library for the SX1278 \n[![MicroPython](https://img.shields.io/badge/MicroPython-2B2728?style=for-the-badge\u0026logo=micropython\u0026logoColor=0f0)](https://micropython.org/)\n[![License: MIT](https://img.shields.io/badge/license-MIT-mint)](https://opensource.org/license/mit)\n\nThis repository provides a lightweight [MicroPython](https://micropython.org/) library for the Ra-01 LoRa module, based on the SX1278 chipset, designed for use with the Raspberry Pi Pico (RP2040) or the Raspberry Pi Pico 2 (RP2350). The library supports communication via SPI.\n  \n## Installation\nCopy the file ```sx1278.py``` to the root directory of your microcontroller. \nThen, import the module using ```from sx1278 import Lora```.\nEnsure you are using the correct frequency for your region. \nYou can adjust this at the top of the library file by modifying the relevant variable.\n\n## Setup\nFirst connect and setup SPI for the LoRa module:\n```python\n# Setup SPI\nspi = SPI(0, baudrate=10000000,\n          sck=Pin(SCK, Pin.OUT, Pin.PULL_DOWN),\n          mosi=Pin(MOSI, Pin.OUT, Pin.PULL_UP),\n          miso=Pin(MISO, Pin.IN, Pin.PULL_UP))\nspi.init()\n```\n\nNext, setup the module. Make sure to connect cs, rx and rst pins correctly.\n```python\n# Setup the lora module\nlr = Lora(spi,\n            cs=Pin(CS, Pin.OUT),\n            rx=Pin(RX, Pin.IN),\n            rs=Pin(RS, Pin.OUT))\n```\n\n## Sending Data\nThis method blocks until the sending is completed. The maximum package length is 255 bytes.\n```python\nlr.send('Hello World!')\n```\n\n## Receiving Data\nThe module operates in receiving mode to receive data. When a message is received, a handler is executed. \nTo keep the program running, use a loop where any necessary break conditions can be implemented.\n```python\n# Handles incoming messages\ndef handler(message):\n    print(message)\n    # Puts module back in receiving mode\n    lr.recv()\n\n# Sets handler\nlr.on_recv(handler)\n# Puts module in receiving mode\nlr.recv()\n\n# Prevents the program from stopping\nwhile True:\n    pass\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimokoethe%2Fsx1278","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimokoethe%2Fsx1278","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimokoethe%2Fsx1278/lists"}