Git Product home page Git Product logo

arduino-lorawan-intro's Introduction

Arduino LoRaWAN Introduction

This repository contains the example code for The Things Summer Academy workshop about LoRaWAN devices.

Provided Code

The following list explains for each sketch / code what it's intended for.

Assignment

Create your own LoRa powered environment sensor station!

Warm up tasks

  1. Create a TTS app and register your device
  2. Create your own sketch that reads from the ENV shield sensors
  3. Send the sensor values to TTS every 20 minutes. Put the board to sleep in the mean time.
  4. Add a payload decoder to decode the sensor values
  5. Round the float values to two digits in the payload decoder

Tasks

  1. Add a warning message in the payload decoder if the temperature is too high / too cold (e.g. -5 / above 34 celsius)
  2. Define approximate illuminance thresholds for: day, twilight, night and add a “daylight” property with a value according to those thresholds (changes over the day)
  3. Add a “pressureTendency” property to see if atmospheric pressure is rising / falling. Do so by calculating the tendency over the last 3 hours. (Hint: millis())
  4. Add the weekly average temperature as a “averageTemperature” property

Bonus

  1. Use a TTS downlink to maintain and synchronise a clock on the Arduino (manually).
  2. Now that you know the time, replace the twilight value of the “daylight” property with either dusk or dawn depending on the time of the day.
  3. Record the approximate sunrise / sunset times based on the daylight property and add them as “sunrise” / “sunset” properties (don’t change over the day)
  4. Think of a way of enabling/disabling the 4 sensors by sending a downlink messages with just 1 byte. (Hint: Use bit-wise operators). If a sensor is disabled, the sensor value shall not be read/sent via LoRaWAN to save energy and bandwidth. Send the same byte in your uplink message to let the payload decoder know how to decode the message. e.g. if The pressure sensor is disabled, only 3 * 4 = 12 bytes are sent for the sensor values and the bytes of the 3rd sensor in the byte stream belong now to the illuminance sensor rather than the pressure sensor.

Optional

If you have a micro SD card, save the sensor data to the SD card to prevent data loss when power goes out. Upon boot, check for existing sensor data and send it to TTS. SEE: https://www.arduino.cc/en/reference/SD

Troubleshooting

If you encounter any errors in the Arduino IDE, please refer to the Arduino help center: https://support.arduino.cc/hc/en-us

Relevant Links

arduino-lorawan-intro's People

Contributors

sebromero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.