Display Distance by Ultrasonic Sensor and Upload to ThingSpeak
by lspoplove in Circuits > Arduino
6936 Views, 51 Favorites, 0 Comments
Display Distance by Ultrasonic Sensor and Upload to ThingSpeak
This toturial is under D-duino-B platform.
You can easily develop IOT projects by D-duino-B.
D-duino can easily connect to web, and easily to be programmed by Arduino IDE.
Its 1.3 OLED is very helpful.
Today I use D-duino control ultrasonic sensor and display distance successfully and upload to ThingSpeak
at the same time.
Prepare
D-duino-B x1
Grove shield for D-duino x1
18650 battery shield V2 x1
Seeed grove ultrasonic sensor x1
Connect and Programe
I put this code on my github.
https://github.com/lspoplove/D-duino/blob/master/G...
D-duino has its 1.3OLED which is using SH1106.
D1 is SDA, D2 is SCL. Here we use D7 connected to D-duino.
Check pin map you will find D7 is pin 13 if you want to programm under Arduino IDE.
Then you can check with ThingSpeak.
All the data will upload to ThingSpeak by WiFi.
Here I set it upload to ThingSpeak every 10 seconds.
If you want to program with this toturial.
Don't forget to get a ThingSpeal API number first.
And don't forget to fix WiFi and Password in the code.