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.
ESP8266
packageESP8266
drawer in the editor to drag out and arrange the blocksDownload
to move your program to the micro:bitSet pin RX and pin TX for ESP8266 Serial Wifi Module, Baud rate: 115200.
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
esp8266=github:elecfreaks/pxt-esp8266iot