Just realized that I had never posted the work that our NSF project has done to enabling folks to access all the ports on the micro:bit using open source resources.
The aim of our work was to allow anyone to freely use a low cost breakout board to access all the digital and analog IO ports, as well as to support servos and motors on the micro:bit. It is vital that the m:b was untethered using BLE so we could support multiple feedback paths and complex control systems (the drip feeding ensures that we don't run out of m:b memory).
We did not want to call to any external API or program, wanting the students to do all the work in Snap! (hard enough to do without adding another darned language for HS students to master!).
Project ExCITE (NSF1923552) has developed a web app that enables:
- a means to scan and connect with micro:bit devices via BLE
- hosts a child page (iframe) in which the Berkeley Snap! web app runs.
[Here is a link to the page].
Please note: nothing will work until the micro:bit is initialized (next topic) and paired.
In addition, we have developed the HEX initialization file to enable to m:b to work with the web app: information can be found here: (Beauty and Joy of Computing) (click on ITEEA item 2 for setup info and HEX download).
The full IO control library will open once the m:b is paired with the webpage above. In the meantime, you can explore most of the blocks through this link. Have a look at the sensing palette!
There are some downside of our approach: if you want to use all the IO capability, you will see that you have to turn off Display ... it uses a 5x5 matrix that is driven by 6 of the IO lines, and it is not possible to share access simultaneously. That does mean that you have to include a turn off display command early in your program if the m:b has been used as a display unit (or, conversely, turn on display if you wish to use it).
The heavy lifting on this project has been undertaken by Steve Holmes, in conjunction with the ExCITE Computer Control team. Hofstra University has undertaken to support this work for a further 3 years.
We will be demonstrating the system during Snap!Con 22
If anyone want to learn more, or get a guide to the use of the block library and its parametrics, just ask!