A Arduino sketch to measure particulates in the air via the SDS011 sensor and sending them to TheThingsNetwork.
- Connect the SDS011 to the PINs configured in the sketch (PIN 8 and 9 are preconfigured)
- Connect the 5V and GND pins
- Connect the DHT sensor to PIN 10, 3.3v and GND.
- Fill in your TTN credentials
- Make sure you have the TheThingsNetwork, DHT library installed, you can get them from the Arduino Library Manager(see below).
- Write the sketch to the arduino
- sleeps for a given amount of time.
- spins up the fan for some time to clean the fan and the housing (1 minute recommened).
- takes 10 samples of sensor data (pm2.5 and pm10)
- calculates the median of each to avoid outlier
- takes the current humidity and temperature values
- encodes the values into bytes
- send them to the given TTN app
Install the following libraries through the Arduino Library Manager:
- TheThingsNetwork
- Adafruit Unified Sensor (scroll wayyy down)
- DHT sensor library
GNU Affero General Public License v3 (AGPL-3.0) See LICENSE file
SDS011 library by R. Zschiegner (rz@madavi.de) https://github.com/ricki-z/SDS011 We keep a local copy if this library. Makes building easier for new users.
TheThingsNetwork library by Johan Stokking (johan@stokking.nl) https://github.com/TheThingsNetwork/arduino-node-lib