IoT Blocks

The Internet of Things (IoT) connects your devices together through the internet, where data can be shared and exchanged. With built-in Wi-Fi, Codey Rcoky can connect to the internet to realize its IoT functionality, such as obtaining data of the weather. Use IoT blocks to explore cutting-edge stuff with Codey Rocky.

Add IoT Blocks

1. Select Codey and click + extension in the Blocks area.

2. From the pop-up Extension Center page, click + Add to add IoT blocks.

3. Go back to Edit Page, you can find the IoT category added to the Blocks area.

Have Some Fun

Let's try out the new IoT blocks. Make Codey report the weather.

1. Drag the when Codey starts up block from the Events category to the Scripts area.

2. Drag the connect to Wi-Fi () password () block to connect Codey to your Wi-Fi. Type in the Wi-Fi name and password.

3. Drag the if () then () block from the Control category. Add a Wi-Fi connected? block from the IoT category to the condition. Codey Rocky needs to join a Wi-Fi network to obtain weather data.

4. Drag the show () block from the Looks category, and wrap it up with the if () then () block. We want Codey to show weather data, so we need to add a weather in () block from the IoT category. Type in a city name. In this example, we type in Shenzhen and choose it from the drop-down list.

5. Click Upload to upload the program to Codey.

6. Check Codey's screen to see weather report.

results matching ""

    No results matching ""