/air-sensor

Pollution, temperature, humidity, and location sensor

Primary LanguageC++

open source pollution / weather sensor

This sensor reports CO2 levels, temperature, humidity, and current location to an MQTT broker.

sensor

To build it, you will need:

  • Feather ESP8266
  • DHT22 temperature/humidity sensor
  • MQ-135 gas sensor
  • SSD1306 OLED Screen
  • button
  • breadboard
  • wire and wirestrippers
  • soldering iron (or buy the components with headers already attached)

pollutionsensor

configuring

You can configure the connectivity settings at the top of the main.cpp file. Here are the values that you need to change:

#define WIFI_SSID "***"
#define WIFI_PASS "***"
#define MQTT_SERVER "***"
#define MQTT_USER "***"
#define MQTT_PASSWORD "***"
#define MQTT_TOPIC "messages"
#define MQTT_ACK_TOPIC "streams" // subscribe to an acknowledgement topic
#define IP_STACK_ACCESS_KEY "***"

Notes:

  • IP Stack allows you to get geolocation data from your public IP address. Get an access key
  • The sensor posts to the topic specified in the MQTT_TOPIC value, suffixed with the unique chip ID of the esp8266. (messages/009481B5)