IOT Workshop ESP8266-12E + DHT11 (Temp + Humidity sensor)

To help take care of for example acoustic guitar. And to help you better take care of your instruments.

I did a project using ESP8266-12E and DHT11. With the help of these I was able to project the temperature and humidity of the area.

ESP8266-12E
DHT11 sensor
4,7k resistor
3 Jumpwire

Data to D4, VCC to 3v3, Gnd to Gnd
Resistor to Data – Gnd

ESP8266

http://terokarvinen.com/2017/create-interent-of-things-for-8-eur-esp8266-12e-and-arduino

First I did the blink test on it.

// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
delay(1000);                       // wait for a second
digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
delay(1000);                       // wait for a second
}

Then I put the DHT11 sensor to work using adafruits instructions.

Screenshot from 2017-03-24 09-32-08

After that I worked on getting the data online using http://iot.botbook.com/ and http://one.api.botbook.com/login.

Screenshot from 2017-03-24 09-21-07

(Humidity)

Accessing and allowing the esp-12e wifi to connect. I used”ESP8266-12E WLAN code v 0.0.9″ to test its internet connecting to wifi. This allowed to me make an stable connection to wifi. Then you can use a power bank or batteries to power it up.

You can use your phones ssid to keep it in the wifi.

const char* ssid     = “xxxxxxx”;
const char* password = “xxxxxxxx”;

const char* host = “http://one.api.botbook.com/”;

void setup() {
Serial.begin(9600);

Serial.println();
Serial.println();
Serial.print(“Connecting to “);
Serial.println(ssid);

WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(“.”);
}

Serial.println(“”);
Serial.println(“WiFi connected”);
Serial.println(“IP address: “);
Serial.println(WiFi.localIP());
}

Full code: https://gist.github.com/Joelii/5d0ada98333dc13710a281e2aa423afb

More IoT projects :
http://terokarvinen.com/2016/internet-of-things-tyopaja-ict8tn017-1-intensiiviviikon-w12

https://github.com/adafruit/DHT-sensor-library
https://learn.adafruit.com/dht

http://randomnerdtutorials.com/esp8266-dht11dht22-temperature-and-humidity-web-server-with-arduino-ide/
https://iotbykarthik.wordpress.com/2016/02/08/tutorial-on-arduino-and-mqtt/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s