Investigating the micro:bit Radio
In Chapter 7 we saw that the BLE offering on micro:bit is comprised of two completely different components:
- A physical, on-board radio transmitter / receiver (antenna).
- The BLE standards that govern what is transmitted, how it is transmitted and how messages received are handled.
BLE acts as a manager: it governs how the antenna is used, but it is completely separate from the antenna. It is possible to bypass BLE and access the radio directly, to manage the antenna ourselves. This chapter will look at how we can use the micro:bit radio to bring value to our data science toolkit.
Section 8.7: Node code
- Bear in mind that you need to change the ID on the node. The pre-compiled code linked to here is for node with ID = 1.
- Click here for the full MakeCode project.
The node code looks like this:
Section 8.8: Server code
- Here is a link to the full MakeCode project.
- Download the pre-compiled code (hex file in a zip folder) .
The server code is shown below: