WiFi and IoT
Notice for using WiFi
KOI 2 can only connect to WiFi networks with a 2.4GHz frequency, please make sure that the WiFi network is compatible.
MakeCode Programming Tutorial
Extension link: https://github.com/KittenBot/pxt-koi2
Search for KOI2 in the search bar, select KOI 2.(KOI 2 has been approved by Microsoft)
The extension will be imported into your project.
Coding Blocks
Sample Program
Connecting to a WiFi network
KOI 2 can only connect to WiFi networks with a 2.4GHz frequency, please make sure that the WiFi network is compatible.
Armourbit users need to use the corresponding initialization block
Sample Program Operations
Press Button A on the Micro:bit to connect to a Wifi network.
Press Button B on the Micro:bit to display the IP address.
Before continuing to the next section, please make sure the KOI has successfully connected to the Wifi network and an IP address is obtained.
If the IP address shows 0.0.0.0, it means that the KOI has failed to connect to the network.
Connecting with MQTT Platform
Armourbit users need to use the corresponding initialization block
Sample Program Operations
Press Button A on the Micro:bit to connect to Wifi and MQTT Platform.
Press Button B on the Micro:bit to publish a message on the MQTT channel.
Micro:bit will display the message received on the MQTT channel.
MakerCloud Sample Program
Messages sent to Makercloud need to follow this formatting, for dn and dsn, any value is fine so as you choose an unique value, for key, replace it with the field name of the MQTT channel.
Last updated