From 412c070f08644eba77c3928fb9afd1c6d70d83d7 Mon Sep 17 00:00:00 2001 From: jakuw Date: Mon, 4 Feb 2019 22:00:32 +0100 Subject: [PATCH] Update manual.md --- docs/Node/manual.md | 66 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 50 insertions(+), 16 deletions(-) diff --git a/docs/Node/manual.md b/docs/Node/manual.md index 9f9e6f2..23659a0 100644 --- a/docs/Node/manual.md +++ b/docs/Node/manual.md @@ -1,41 +1,75 @@ -# manual -## ttn-tul-node-v1 manual +# Manual ttn-tul-node-v1 ## Arduino configuration +### Asemble Arduino Board +In our project we use additional board provided by TME. It allows us to display data on the LCD and makes connecting sensors more confortable. If you use it also, remember to put all jumpers like on the picture. + +![alt text](https://github.com/jakuw/ttn-tul-1/blob/master/docs/Node/TME_board.jpg "Logo Title Text 1") ### Download Arduino IDE -Link to the software is available on the website: https://www.arduino.cc/en/Main/Software. +In our project we use 1.8.19.0 version. + +Link to the software is available on the website: https://www.arduino.cc/en/Main/Software. ### Test the Arduino Board -he easiest way to test the Arduino board is to load the "Blink" example. +The easiest way to test the Arduino board is to load the "Blink" example. + You can find the project in the menu File/Examples/01.Basics/Blink or go throught tutorial: https://www.arduino.cc/en/Tutorial/Blink. + ### Install the LMIC-Arduino library and others (e.g. for LCD hd44780) Go to Sketch/Include Library\Manage Libraries... and search for "LMIC-Arduino". Install the newest version. + +"LMIC-Arduino" provides template with simple real time operating system and function, which sends data. # thethingsnetwork.com portal ### Sign up ### Create application and add device # Get date to PŁ "LoraStore" portal Ask administrator for them. ## Change Activation Method to ABP -## Add decoder function here https://console.thethingsnetwork.org/applications/ YOUR NAME OF APPLICATION /payload-formats -Decoder function is available on our the github. -## Add HTTP integration here https://console.thethingsnetwork.org/applications/ YOUR NAME OF APPLICATION /integrations -ccess Key: default key -URL: https://ttn-parser-cs.azurewebsites.net/api/ttn-11-01-2019?code=A4HPfv9KqjDE2StqdZPc01j0eaZ0hJhDSqEy6QpTJyBYHy3jLCGyhg== -Method: POST -## Arduino + LoRa + +Example of settings of the device is presented the picture. + +![alt text](https://github.com/jakuw/ttn-tul-1/blob/master/docs/Node/device_settings.png "Logo Title Text 1") + +## Add decoder function + +Decoder function converts array of asci signs to json format. + +Go to the website: https://console.thethingsnetwork.org/applications/ **YOUR NAME OF APPLICATION** /payload-formats + +Decoder function is available on our the github repository: https://github.com/sosnus/ttn-tul-old/tree/master/src/ttn-code + +## Add HTTP integration + + +Go to the: https://console.thethingsnetwork.org/applications/ **YOUR NAME OF APPLICATION** /integrations + +Set only the following parameters: +1. Access Key: default key +1. URL: https://ttn-parser-cs.azurewebsites.net/api/ttn-11-01-2019?code=A4HPfv9KqjDE2StqdZPc01j0eaZ0hJhDSqEy6QpTJyBYHy3jLCGyhg== +1. Method: POST +Anything else left default. + ### Check board -## Connect arduino uno to RFM95W module, potentiometer (A1 pin) and LCD (SDA,SCL). ## Download our example from https://github.com/jakuw/ttn-tul/tree/master/src/node/arduino_ttn. Project "arduino ttn" contains three files: - i. arduino_ttn - code responsible for connection with RFM95W module, - ii. my_functions - here you place your part of code, - iii. send_functions - functions, which convert data and create appropriate message. +1. arduino_ttn - code responsible for connection with RFM95W module, +1. my_functions - here you place your part of code, +1. send_functions - functions, which convert data and create appropriate message. + +You can find "add new tab" on the drop-down list like on the picture. + +![alt text](https://github.com/jakuw/ttn-tul-1/blob/master/docs/Node/list_new_tab.png "Logo Title Text 1") + ## Replace following network data in "send_functions": i. NWKSKEY ii. APPSKEY iii. DEVADDR +Take data from https://console.thethingsnetwork.org/applications/ **YOUR NAME OF APPLICATION** /devices/ **YOUR DEVICE** + ## Replace following sensor data in "send_functions": i. SensorId ii. SensorPassword +This data you should get from the administrator. + ## Upload project ## Check data traffic in data tab on https://console.thethingsnetwork.org/applications website. ### Add your own part of code @@ -43,4 +77,4 @@ My_functions file contains two standard functions: - setup - runs only once at the beginning. - main - runs each cycle. Here you can place your part of code. -### Good luck and have fun ; ) \ No newline at end of file +### Good luck and have fun ; )