# Filling out IoT fields?

**URL:** <https://forum.makecode.com/t/filling-out-iot-fields/9697>\
**Category:** micro:bit\
**Created:** [August 19, 2021, 7:19am UTC](https://forum.makecode.com/t/filling-out-iot-fields/9697 "2021-08-19T07:19:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![frank\_schmidt](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@frank\_schmidt](https://forum.makecode.com/u/frank_schmidt)\
**Post date:** [August 19, 2021, 7:19am UTC](https://forum.makecode.com/t/filling-out-iot-fields/9697/1 "2021-08-19T07:19:15Z")

</div>

> **[DFRobotIOT1](https://makecode.microbit.org/27808-63076-83274-35916)**
>
> Made with ❤️ in Microsoft MakeCode for micro:bit.

We have this DF Robot IoT board which looks quite functional . If I wanted to explain to a 14 yr old how to fill in the fields in each block in the above code, where would I begin ? [https://www.dfrobot.com/product-1926.html](https://www.dfrobot.com/product-1926.html)  
I have Thingspeak on another device but it is only partially functional. Thanks

---

<div class="post-metadata">

**Author:** ![bsiever](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bsiever/32/1032_2.png) [@bsiever](https://forum.makecode.com/u/bsiever)\
**Post date:** [August 19, 2021, 4:40pm UTC](https://forum.makecode.com/t/filling-out-iot-fields/9697/2 "2021-08-19T16:40:38Z")

</div>

I’m not sure there’s an easy answer that’s overly kid-friendly, but here are a few ideas:

- Maybe start by trying to get a clearer understanding of MQTT by itself (ignore ThingSpeak for now). This site has an ok overview: [http://www.steves-internet-guide.com/mqtt-works/](http://www.steves-internet-guide.com/mqtt-works/)
- `setup Wi-Fi` is about connecting to the local wi-fi access point. It’s the micro:bit equivalent of entering connecting to Wi-Fi on a laptop (which you could demonstrate)
- The `setup mqtt` is about connecting to a remote “Broker” for messages. The broker is somewhat like a mash-up of a post office and a newspaper copy shop/printing office. They recieve messages (specific newspapers) and deliver copies to anyone who has subscribed to that newspaper. This unusual post office also requires that each person have a “key” to get-in/join and they indicate the particular newspaper that they are most interested in (their default). These (individual “key” and default newspaper) are the user/password and topic in the `setup mqtt` Imagine that there is a newspaper called the “OzarkTimes”. People who want to publish this newspaper or join to get it would indicate “Ozark Times” as their default topic.
- `MQTT Send message to Topic` will send a new copy of a specific newspaper. For example, `MQTT Send "Sunny Tomorrow" to "OzarkTimes"` would send the message “Sunny Tomorrow” to everyone who indicated they wanted to subscribe to the “OzarkTimes” (using the specific post office/copy shop that was configured in `setup mqtt`)
- You should add in a block for `MQTT on TOPIC received MESSAGE` to be able to show any messages that are sent to a particular topic, like “OzarkTimes”. For example, you could "MQTT on Ozark Times received Message` that will then show the resulting message on the screen. (This would allow a micro:bit to show the “Sunny Tomorrow” message that was sent by another micro:bit.

To compare it to the micro:bit `radio` blocks:

- `radio` can just send to/from other micro:bits in radio range (~100-300 ft / ~35-100 meters)
- MQTT goes through the internet and could be used to communicate between micro:bits around the world. It can also allow micro:bits to share data with any other device that can interact with mqtt. These can include “website” dashboard and other electronic devices.

That’s just the MQTT part. You could use just the `setup wi-fi` with the `ThingSpeak` blocks to directly interact with ThingSpeak.

I hope that helps a bit,  
Bill

---

<div class="post-metadata">

**Author:** ![frank\_schmidt](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@frank\_schmidt](https://forum.makecode.com/u/frank_schmidt)\
**Post date:** [August 20, 2021, 3:02pm UTC](https://forum.makecode.com/t/filling-out-iot-fields/9697/3 "2021-08-20T15:02:05Z")

</div>

You worked very hard on this description, @bsiever . Thanks for that. I have re-read it and will look into MQTT hoping that eventually the kids and I can better understand the Internet of Things via our hardware and MakeCode. Not sure that it is possible but there seems to be a lot of talk about it. Thanks again, Frank
