attnode/Firmware/README.md

24 lines
843 B
Markdown
Raw Normal View History

2019-09-19 03:40:34 +00:00
# TinyLoRa Firmware
Example Sensor Node Firmware with a BMP/E280 Sensor.
Please Change the Values in src/secconfig.h to your Keys from https://console.thethingsnetwork.org. Device has to be set to ABP Mode.
2019-09-19 17:40:32 +00:00
2019-09-19 18:14:51 +00:00
Project was created using PlatformIO Atmel-AVR Framework
## Decoder for the TTN Application
```
function Decoder(bytes, port) {
var decoded = {};
decoded.t = (bytes[0]) | (bytes[1] << 8 ) | (bytes[2] << 16 ) | (bytes[3] << 24)
decoded.t = decoded.t / 100
decoded.p = (bytes[4]) | (bytes[5] << 8 ) | (bytes[6] << 16 ) | (bytes[7] << 24)
decoded.p = decoded.p / 100
decoded.h = (bytes[8]) | (bytes[9] << 8 ) | (bytes[10] << 16 ) | (bytes[11] << 24)
decoded.h = decoded.h / 100
decoded.v = (bytes[12]) | (bytes[13] << 8 ) | (bytes[14] << 16 ) | (bytes[15] << 24)
decoded.v = decoded.v / 1000
return decoded;
}
```