The AirElixir is a sensor data collector on Raspberry Pi, capable of recording and uploading information about temperature, humidity, particulate matters, total volatile organic compound, and equivalent calculated carbon-dioxide to the internet.
component | manufacture | matters |
---|---|---|
DHT11 | Aosong | temperature, humidity |
SDS021 | Nova | PM2.5, PM10 |
CCS811 | ams | TVOC, eCO2 |
- Sensor to Raspberry Pi connection
GND <-> GND DATA <-> Pin 16 VCC <-> 3.3V
- Edit file
/boot.cmdline.txt
, delete a charactersconsole=ttyAMA0,115200
BEFORE: dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait AFTER: dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
- Edit file
/etc/inittab
, coment the last line of the file# T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
- Sensor to Raspberry Pi connection
Red wire <-> Pin 4 Black wire <-> Pin 6 Yellow wire <-> Pin 8 Blue wire <-> Pin 10
- Enable I2C
sudo raspi-config
- Edit file
/boot/config.txt
, add to taildtparam=i2c_baudrate=10000
- Sensor to Raspberry Pi connection
VCC <-> 3.3V GND <-> GND I2C SDA <-> pin 2 I2C SCL <-> pin 3 WAK <-> GND
- Check that the sensor is wired up correctly
sudo i2cdetect -y 1
git clone https://github.com/nabinno/air_elixir
cd air_elixir
mix deps.get
MIX_ENV=prod mix
GSS_VALUES_APPEND_WEBHOOK={{google-spreadsheets-values-append-webhook}} \
MIX_ENV=prod \
nohup elixir --name app@hostname --cookie "AirElixirCookie" -S mix run --no-compile --no-halt &
disown %1
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request
A whale! Down it goes, and more, and more Up goes its tail! -Buson Yosa