diff --git a/GW-custom/ESP32_GENERIC-20241129-v1.24.1.bin b/GW-custom/ESP32_GENERIC-20241129-v1.24.1.bin new file mode 100644 index 0000000000000000000000000000000000000000..f57f3376ccba82323c4f0695b2ed54d76bd0ea38 Binary files /dev/null and b/GW-custom/ESP32_GENERIC-20241129-v1.24.1.bin differ diff --git a/GW-custom/PyLoRa/pymakr.conf b/GW-custom/PyLoRa/pymakr.conf new file mode 100644 index 0000000000000000000000000000000000000000..08e4710f2ded1af4c9b02cdb363ce0636a36747c --- /dev/null +++ b/GW-custom/PyLoRa/pymakr.conf @@ -0,0 +1,23 @@ +{ + "address": "COM6", + "username": "micro", + "password": "python", + "open_on_start": true, + "safe_boot_on_upload": true, + "sync_file_types": "py", + "py_ignore": [ + "pymakr.conf", + "dev-requirements.txt", + ".vscode", + "LICENSE", + ".gitignore", + ".git", + "project.pymakr", + "env", + "venv", + ".python-version", + ".micropy/", + "micropy.json" + ], + "fast_upload": false +} \ No newline at end of file diff --git a/GW-custom/uPyLoRaWAN/main.py b/GW-custom/uPyLoRaWAN/main.py index 333a7e4da40eb3935e6140d894d64aee4b8e962a..9d33e7864308b05cef2c2ef305879a06b4ca4877 100644 --- a/GW-custom/uPyLoRaWAN/main.py +++ b/GW-custom/uPyLoRaWAN/main.py @@ -1,11 +1,12 @@ #import LoRaDuplexCallback #import LoRaPingPong #import LoRaSender -from examples import LoRaSender -from examples import LoRaReceiver +import _thread +import time from config import * -from machine import Pin, SPI +from examples import LoRaReceiver, LoRaSender +from machine import SPI, Pin from sx127x import SX127x device_spi = SPI(baudrate = 10000000, @@ -19,6 +20,17 @@ lora = SX127x(device_spi, pins=device_config, parameters=lora_parameters) #example = 'sender' example = 'receiver' +led = Pin(2, Pin.OUT) # Assuming GPIO2 is used for the LED + +def blink_led(): + led.on() + time.sleep(0.5) + led.off() + time.sleep(0.5) + + +# Start a thread to blink the LED +_thread.start_new_thread(lambda: [blink_led() for _ in iter(int, 1)], ()) if __name__ == '__main__': if example == 'sender': LoRaSender.send(lora)