**Everything in this repository is work in progress, use at your own risk!**
## Hardware
* Attnode v3 with PCB-Edge SMA Antenna Mount
* Powerpack, LiPo Cell (500mA), LiPo Charger Board (You can use any 3,3V Power Source)
* NEO M8N GPS Breakout (Any 3.3V-Capable Module which is NMEA-Compatible should work)
* SSD1306 128x64 OLED-Display
* Button
### Connections
Connect the AttNode and Modules as follows:
#### GPS
| ATTNode | Module |
|---------|--------|
| Vin | VCC |
| GND | GND |
| Tx | RX |
| Rx | TX |
#### OLED
| ATTNode | Module |
|---------|--------|
| Vin | VCC |
| GND | GND |
| SDA | SDA |
| SCL | SCL |
#### Button
The Button has to be Connected between PC2 and GND on the ATTNode
## Software
This repository contains the PlatformIO project with the mapper firmware. Copy config.example.h to config.h and insert your keys and DeviceID from TTN. Compile and upload as normal (See AttNode v3 dokumentation for details).
### Usage
If a Button is connected you can use the following functions:
* **Short press:** Schedule an imideate send, regardless of interval | In Setup Mode - cycle through Settings or Change Activated Setting
* **Long Press (>1s):** Enter Setup Mode, Activate a Setting in Setup Mode
In Setup Mode a '>' in front of a Line identifies the selected option, a '>>' identifies an activated setting (can be changed by short press). Use long press to deactivate an activated setting
### Add Mapper to TheThingsStack Community Edition
As there are some shortcomings with adding ABP devices as this mapper to TTN (mainly creating unnecessary downlinks and handling of framecounter resets) currently the best way to add the mapper to an application is to use the [ttn-lw-cli commandline utility](https://www.thethingsindustries.com/docs/getting-started/cli/installing-cli/). First you will have to create an application with the ttnmapper-integration as described [here](https://docs.ttnmapper.org/integration/tts-integration-v3.html), if you don't already have one. Then cou can use the following command to add a mapper device to the application:
Replace all the values in `<..>` with the appropriate values. The DevAddr and App-/Network-Keys might have to be generated in the web-console first, at least I haven't found a way to generate these with the CLI tool so far.