This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import time | |
import struct | |
from network import LoRa | |
import pycom | |
pycom.heartbeat(False) | |
pycom.rgbled(0x000fff) #blue | |
# A basic package header, B: 1 byte for the deviceId, B: 1 bytes for the pkg size | |
_LORA_PKG_FORMAT = "BB%ds" | |
_LORA_PKG_ACK_FORMAT = "BBB" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Benjamin Chodroff, 2017 | |
# This is the main listening gateway | |
# It's job is to receive LoRa messages and, if a color, set the LED to that color | |
# Otherwise, it will set unknown messages or errors as "white" | |
import machine | |
button=machine.Pin("G17",machine.Pin.IN, pull=machine.Pin.PULL_UP) | |
led=machine.Pin("G16", machine.Pin.OUT) | |
led.value(1) | |
#If the dev button is not pressed (0) then run this device in broadcast mode | |
if button(): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +benjaminchodroff is my blockchain ID. https://onename.com/benjaminchodroff |
NewerOlder