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

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

Sample Program Operations

  1. Press Button A on the Micro:bit to connect to a Wifi network.

  2. 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

Sample Program Operations

  1. Press Button A on the Micro:bit to connect to Wifi and MQTT Platform.

  2. Press Button B on the Micro:bit to publish a message on the MQTT channel.

  3. Micro:bit will display the message received on the MQTT channel.

MakerCloud Sample Program

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