I was hoping to use MicroBlocks or Make Code to program the Micro:bit. Having one “Master” Micro:bit connected via USB to a Raspberry Pi. The “remote” Micro:bits would use Radio to send their Data back to this “Master”.
But by the looks of things the Data would need to be Grouped together into one Message in the “Master” to be sent to Webthings. As I can only connect one Micro:bit to Webthings at a time.
So I think I will look further into sending Strings to Webthings. But that opens up another thought about how to group the Message so that it reflects different Messages from different Mico:bits.
The reason for using Micro:bits is that they can be housed in a small waterproof box and placed around the Garden. Including powered by AA Cells where no Mains Power is available.
For example the “message” might show as any one of the following examples?
“Shed Comms Normal/Failed”
“Shed Power Normal/Failed”
“Shed Door Open/Not Open”
“Shed Door Closed/Not Closed”
“Shed Door Normal/Fault”
Can these separate sources be shown as separate devices in Webthings such as “Pond …” and “Shed …”. Or can I only show one long message detailing all the separate messages all at once?
I don’t have experience with programming Micro:bits, but in theory you could have the master Micro:bit expose multiple web things which represent each individual remote Micro:bit.
Each web thing would have its own Thing Description and set of properties.
I’ve had good luck using the “Virtual Things” addon to add custom things to WT and then wrote remote sw to alter their properties using http API calls. Works well to trigger events within webthings.
Used the Run Program option to kludge communication from a Virtual Thing to a remote device. Not ideal, but it prevented me from having to write another addon.