Page 146 - KEC Khaitan C6 Flipbook
P. 146

∑  Give your channel a name, like Temperature Data.
                                ∑   In the Name Field , type Temperature (this tells ThingSpeak that we will be sending

                                   temperature data).
                                ∑  Scroll down and click Save Channel.
                            5.   Get Your Channel ID and API Key

                                ∑  After saving, ThingSpeak will show you some numbers and codes:
                                   o  Channel ID: A number that identifies your channel.

                                   o   Write  API Key:  A special code that  allows Micro:Bit to  send data to  your
                                       channel.
                                ∑   Important to write these down or keep the page open because you’ll need them

                                   later.
                  Step  2   Connect the Micro:bit to the WiFi Shield

                             The Micro:bit cannot connect to the Internet on its own, so we use a WiFi shield like the
                            ESP01, ESP8266 or ESP32. This shield will connect to the internet and send the data from
                            the Micro:bit to ThingSpeak.






















                  •           You will need to connect the Micro:bit to the WiFi shield using wires. The WiFi shield has
                            pins that you can connect to the Micro:bit.

                            ∑   The WiFi shield uses serial communication to talk to the Micro:bit. This means it
                                sends and receives data through specific pins on both devices.

                  Step  3   Program the Micro:bit to Send Data
                             Now that your Micro:bit is connected to the WiFi shield, you need to write a program
                            (code) to tell the Micro:bit to send sensor data to ThingSpeak.

                            ∑   You will use the Arduino IDE (a software to write programs for the ESP8266 or ESP32)
                                to write this code.

                            ∑   The code will tell the Micro:bit to connect to WiFi, read sensor data, and send that
                                data to ThingSpeak using your Channel ID and API Key.

                  Step  4   Upload the Code and Test



                  144   Premium Edition-VI
   141   142   143   144   145   146   147   148   149   150   151