Buy from US | Buy from UK | Buy from DE | Buy from IT | Buy from FR | Buy from ES | Buy from JP |
In Lesson 4, we learned how to read remote the DHT11 temperature/humidity sensor through browser.
In this lesson, we will use another powerful sensor called BMP180 which read pressure, temperature, sea level pressure and altitude data. We will use OSOYOO ESP8266 WiFi Shield to send the data to remote browser.
Arduino UNO board x 1
OSOYOO ESP8266 WIFI Shield x 1
BMP180 sensor Module x 1
USB cable x 1
Bread board x 1
Jumper wires several
First, please insert the ESP8266 wifi Shield into your UNO board,
Arduino UNO Board | BMP180 sensor module |
A4 | SDA |
A5 | SCL |
GND | – |
3.3V | + |
Step A)Install library: (if you have installed Adafruit BMP085 library, please skit this step)
Download the library from https://osoyoo.com/wp-content/uploads/2018/05/Adafruit_BMP085_Library.zip.
Then in your Arduino IDE ->Sketch->Include Library->Add .ZIP Library and select the adafruit_bmp085_library.zip file you just downloaded, and upload it to Arduino.
Step B) Connect the Arduino UNO board to computer via USB cable,
Step C) Open the Arduino IDE and choose corresponding board type and port type for you project.
Step D) Download sample code from https://osoyoo.com/driver/wifi-iot/lesson5/esp8266-lesson5.zip, unzip the file and double click the esp8266-lesson5.ino file,
Step F) Arduino IDE: Click file -> click Open -> choose code “esp8266-lesson5”, load up the sketch onto your Arduino.
char ssid[] = "******"; // your network SSID (name) char pass[] = "******"; // your network password please replace the ****** with your correct wifi SSID and password, otherwise your project can not connect to Internet. After change above lines, load the sketch into Arduino IDE.
Open your Serial Monitor, you can see your router will assign an IP address to your Arduino as following:
In above example, 192.168.50.116 is the IP address of my Arduino.
Now use another computer or your cell phone’s browser to visit url : http://192.168.50.116 Your browser will show following result:
DownLoad Url osoyoo.com