ESP8266_IoT package is developed under the cooperation of ELECFREAKS, CLASSROOM and TINKERCADEMY.
This package uploads data to THINGSPEAK IOT through ESP8266 serial wifi module.
Before start, you have to register an account of thingspeak.
- Insert the OLED display into the I2C ports on the ELECFREAKS Octopus:bit.
- Open Microsoft Makecode/microbit and create a new project
- Search and add the
ESP8266
package - Use the
ESP8266
drawer in the editor to drag out and arrange the blocks - Click
Download
to move your program to the micro:bit
Set pin RX and pin TX for ESP8266 Serial Wifi Module, Baud rate: 9600.
ESP8266_IoT.initwifi(SerialPin.P2, SerialPin.P8)
Connectwifi,please fill in your ssid and your key.
ESP8266_IoT.connectwifi("your ssid", "your key")
Connect thingspeak IoT TCP server.
ESP8266_IoT.connectthingspeak()
Set data to be sent. Firstly, you should fill in your write api key.
ESP8266_IoT.tosendtext(
"your write api key",
0,
0,
0,
0,
0,
0,
0,
0
)
Send data to thingspeak.
ESP8266_IoT.senddata()
MIT
- for PXT/microbit (The metadata above is needed for package search.)
esp8266=github:elecfreaks/pxt-esp8266iot