How to Send Micro:bit Data to ThingSpeak IoT Platform
标签:DIY
LUCY 发布于 2018-01-19 16:42
Internet of Things (IoT) is a concept that aims to take advantage of the benefits of connected internet connectivity continuously. It creates the network of physical devices embedded with computing system (identity, software, sensors) to connect and exchange data - like between home appliances, vehicles and other objects. Each object is uniquely identifiable through its embedded computing system but is able to inter-operate within the existing Internet infrastructure – wifi connection.
According to Wikipedia, The IoT allows objects to be sensed or controlled remotely across existing network infrastructure, creating opportunities for more direct integration of the physical world into computer-based systems, and resulting in improved efficiency, accuracy and economic benefit in addition to reduced human intervention.
BBC micro:bit is the most popular development board in the current. Then can we combine BBC micro:bit with IoT? The answer is definitely yes. Today, we are going to talk about how to send data from micro:bit to thingspeak IoT platform using ESP8266WIFI module.
Before we start this project, firstly you have to register an account in thingspeak.
After registration completed, click under the menu of to create a new channel.
Fill in your channel name and channel field, then tick the square behind the field. Here, we name the channel . I want to display the temperature data received from micro:bit, so I fill the name into the column of .
Click to save the above settings, then you will see a page like this. Click .
In this page, you can see , which is very important in the latter steps.
Note: Different projects will generate different .
- BBC micro:bit
- ESP8266 serial wifi module
- ELECFREAKS octopus:bit
- IIC OLED module
- micro:bit power module
Connect ESP8266 module to Octopus:bit. Connect on the ESP8266 module to , then to . Because ESP8266 module requires 3.3V power supply, we have to "+ " on the ESP8266 module to " + " under the yellow pins on Octopus:bit 。
Plug the OLED module to IIC connector in the bottom left corner of Octopus:bit.
Then plug in micro:bit to Octopus:bit.
After connection completed, you will see the following picture showed.
Click to open makecode.microbit.org. Search in for , and then add this package.
After we have added IOT Package, we can see 3 extra block drawers. In this case, we will only use and .
Initialize OLED screen in the block, and set RX and TX on ESP8266 wifi module to be PO and P1 separately.
Add the following blocks into :
: Connect ESP8266 with your wifi by filling in your wifi SSID and KEY.
: Connect ESP8266 to Thingspeak IOT platform.
: Set the data to be sent. Please fill in your Write API Key under your Thingspeak account to . You can fill 8 groups of any data into . In the previous Channel setting, we have just activated field 1. So here, we place block to field 1.
can send data to IoT platform.
When the data received in the serial port, display the data on the OLED screen. Then we can monitor the program operation through OLED screen.
Program download. You can visit the whole program though the link here: https://makecode.microbit.org/_9DVWo5cg3iy4
Or you can visit the page below to the program of this case directly.
Because if you power through the USB connector on the micro:bit, the drive performance will be very weak, which might lead to the instability of ESP8266.
The input of this power module can connect with DC power supply or USB, and its output can connect the battery terminal of micro:bit directly.
Use OLED to monitor the program operation.
Now, it's time to see a wonder. Return back to your Thingspeak page, click , then you can see the data you sent from micro:bit to the IOT platform. And the data keeps updating for every minute!Micro:bit has ipload the data to the Internet! Now you can access these data with your computer, mobile or tablet!
From the above loaded package, we can see that our environment IoT kit is coming out soon. Environment IoT Kit can detect all kinds of environment data like temperature, humidity, wind speed, light intensity, noise, dust, PM2.5 and so on. Besides, you can upload these environment data to thingspeak IoT server through ESP8266 serial wifi module. Just waiting!
I would like to thank Mr. Zach, CEO of Micro:bit Educational Foundation, for his acknowledgement of our kit.
I want to thank Mr. Waris from micro:bit foundation too! Through several deep communication in mulitple days and nights, we have introduced this kit to the public. You have provided lots of ideas and inspirations for me. Thank you very much!
Also, I want to thank our TinkerCademy parterners. Thank you for giving us so much technique support!
Besides, I want to thank my wife for her support. You are the most powerful backbone in my family! Thank you!
在淘宝中搜索“恩孚电子”,你可以以最优惠的价格购买到英国原装正版micro:bit哦!
如果想联系我们,请发邮件至:louise@elecfreaks.com 。
作者的最新作品
-
按钮
2018-05-31 17:05发布
-
用micro:bit让面包板上的两颗LED交替闪烁
2018-05-31 17:01发布
-
抛煎饼游戏
2018-05-18 18:33发布
-
micro:bit跑迷宫游戏
2018-05-18 18:29发布
-
速算游戏
2018-05-18 18:25发布
阅读数: 5071