Skip to content

Commit

Permalink
Merge pull request #1 from xelarep/master
Browse files Browse the repository at this point in the history
Updated libraries and lib_deps
  • Loading branch information
mmichon authored Feb 20, 2018
2 parents 51951c6 + 6c41b04 commit 4bf9f29
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Yet Another Web-Enabled Weather Sensor Publishing To MQTT

This is ESP-8266 code that reads temp and humidity readings every minute from a DHT11, updates a small SSD-1306-based display, and publishes readings to MQTT topics. The hardware should cost <$15 and wiring it up should take <15 minutes.

<a href="https://www.youtube.com/embed/H_7alrjquLI" target="_blank"><img src="http://i.imgur.com/WvYhmjtl.jpeg"
<a href="https://www.youtube.com/embed/H_7alrjquLI" target="_blank"><img src="http://i.imgur.com/WvYhmjtl.jpeg"
alt="Video" height="250" border="10" /><p>Demo Video</a>


Expand All @@ -22,11 +22,15 @@ All this should cost <$15
* platformio
* The following libs:
```
pio lib install 135
pio lib install 188
pio lib install 18
pio lib install 89
Adafruit DHT Unified_ID18
DHT sensor library_ID19
Adafruit Unified Sensor_ID31
Adafruit GFX Library_ID13
Adafruit SSD1306_135
PubSubClient_ID89
```
These libraries are loaded automatically by platformio upon ```lib_deps``` dependencies. No need for manual install.
If you use atom.io yoou should open this project with the platformio IDE to get these libraries into the list of installed libraries.

## Provisioning an MQTT topic and connecting to Wifi
1. Create an account on devicehub.net
Expand Down
14 changes: 14 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,17 @@
platform = espressif8266
framework = arduino
board = d1_mini

lib_deps =
# Adafruit DHT Unified_ID18
[email protected]
# DHT sensor library_ID19
[email protected]
# Adafruit Unified Sensor_ID31
[email protected]
# Adafruit GFX Library_ID13
[email protected]
# Adafruit SSD1306_135
# --> project lib folder...
# PubSubClient_ID89
[email protected]
8 changes: 4 additions & 4 deletions src/weather_sensor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
#include <SPI.h>
#include <Wire.h>
#include <ESP8266WiFi.h>
#include <Adafruit_SSD1306.h> // pio lib install 135
#include <Adafruit_GFX.h> // pio lib install 13
#include <DHT.h> // pio lib install 18
#include <PubSubClient.h> // pio lib install 89
#include <Adafruit_SSD1306.h> // Adafruit SSD1306_135 --> local lib/
#include <Adafruit_GFX.h> // Adafruit GFX Library_ID13
#include <DHT_U.h> // Adafruit DHT Unified_ID18, DHT sensor library_ID19, Adafruit Unified Sensor_ID31
#include <PubSubClient.h> // PubSubClient_ID89
#include "config.h"


Expand Down

0 comments on commit 4bf9f29

Please sign in to comment.