-
1Summary – regular use after setting up
Connect the microbit using a micro USB cable from the microbit to the device running the communication software.
Run Grid 2 or Grid 3 or Tobii Communicator.
Run the Windows software – double click on activity_indicator.exe. This is not necessary if you set up Windows to automatically run the software at start-up.
If the microbit is not plugged in you will see the message ‘no microbit found’. Plugin the microbit. The software allows for the microbit to be removed and plugged in during use. You can start the communication software with the program running and it will be picked up.
The screenshot below shows what you will see when the software is started with no microbit plugged in and no communication software running.
When the communication software is running, the number of black pixels detected in the message window and the limit to trigger a detection is displayed. These are debugging messages to allow me to see what is happening with the software as I develop it. The detection limit can be changed using the command line – see the section ‘Command line options to adjust sensitivity’. The screenshot below shows an example of a change in the communication software detected for either Grid or Communicator.
-
2Getting the microbit connected to your Windows device
This connection should happen automatically with Windows 10. If you are using an earlier version of Windows, you will need to install the driver for the microbit. Detailed instructions on how to do this are on my blog post: https://www.seismicmatt.com/2020/04/27/connecting-the-bbc-microbit-to-windows-and-adding-code-to-it/
-
3Downloading the code for the microbit and the laptop/tablet from GitHub
Code for the microbit and the communications device needs to be downloaded and installed. This all lives on the GitHub site listed in the resources section.
The simplest thing to do is to download the entire repository as a single .zip file from the GitHub site, then extract the folder we need from that.
Go to the GitHub site:
https://github.com/hardwaremonkey/microbit_activity_indicator
Clone or download the repository. If you want a step by step guide with screenshots, please go to my website instructions at:
https://www.seismicmatt.com/give-me-a-minute-set-up-and-use-instructions/
The downloaded file is called microbit_activity_indicator.zip and is about 12 Mb large. Unzip the .zip file somewhere.
-
4Installing code on to the microbit
The file called ubit_flash.hex needs to be dragged and dropped into the MICROBIT folder. This will program the board. If you are interested, the Micropython script that creates the .hex file is in ubit_flash.py. I put up all the code used in the project to enable anybody else to improve the project.
Wait about 10 seconds for the microbit to start to program. The light on the back of the microbit will then flash for about 10 seconds as it programs. Then a column of 3 LEDs should light. Press button A on the microbit. The bar should sweep around the LED display.
The code will remain stored on the microbit and run whenever it is powered. The microbit can be left unpowered and the code will stay on the device for when you next connect it to the Windows device. If your code is loaded and working, please proceed to the next section. If you can’t access the online editor, you can download the mu editor and install this on your PC to install the software to the microbit offline. The mu editor can be downloaded from: https://codewith.mu/
As the microbits are being distributed to all 11-12 year olds in the UK, if you get stuck installing code on to the microbit and live in the UK, find a friendly 11-12 year old to help you out.
-
5Installing monitoring software on to the laptop/tablet
In this step, we need to install the software that monitors Grid or Communicator on to the communication device.
The monitoring software is all in a single file called activity_indicator.exe which is in the directory called /dist (short for distribution) in the files that you downloaded and unzipped earlier.
To start the monitoring software, double click on the file activity_indicator.exe.
If a ‘VCRUNTIME140.dll missing error’ pops up instead don’t panic! Go to section ‘VCRUNTIME140.dll missing error’ below.
A terminal should pop up with some messages. The messages are explained above in the section ‘What happens in normal use’. Once you are happy that the software is running, this terminal can be minimised.
The software will look for an attached microbit. If a microbit is not found, the software will tell you this. Currently, the software looks for either Grid or Tobii Eyetracker communications software. If neither communications software is running, then the software will tell you this. The software will then print a message each time that a change is detected and send a signal to an attached microbit, which causes the microbit to display a short moving pattern.
If the microbit is disconnected when the script is running, you can reconnect the microbit and the software will reconnect with it.
If the Windows .exe file does not run, you can download the Python script from the GitHub site and run that using Python.
-
6VCRUNTIME140.dll missing error
If a ‘VCRUNTIME140.dll missing error’ pops up instead don’t panic! The code relies on some Microsoft Visual Studio libraries being installed. You should put the error you get into the Google machine to find the correct Visual Studio download as this changes as new versions are released. At the time of writing, this link was: https://www.microsoft.com/en-us/download/details.aspx?id=52685
-
7Automatically running Give Me a Minute at startup
Once you are happy that the software does what you want, you can set up Windows to automatically run the software on startup.
This needs to be set up when logged in as the user who will be using the software. If different accounts are set up on the communication device, log in as the user will be using the microbit.
‘Give me a minute’ can be set to run when Windows starts by adding a link to the activity.exe file in the Windows startup directory. The startup directory can be found by typing:
shell:startup
into an explorer window at the top.
This will take you to your Startup directory. This Startup directory is in a different location for each user account that Windows has for your system, which is why you need to be logged in as the user who wants activity_indicator.exe to run at startup. Everything in this directory automatically runs when Windows starts up. In this directory, right-click on the screen and select ‘New’, then ‘Shortcut’ (second from the top) to create a link to where you saved activity_indicator.exe.
Now click on ‘Browse’ and navigate to where you saved activity_indicator.exe.
Select the file activity_indicator.exe, click ‘OK’, ‘Next’ and ‘Finish’.
You should now have a new shortcut in your Startup directory.
Note: This will only automatically start for the user who created the Shortcut. If somebody else logs into the communication device using a different user account, a different Startup directory is used. So the Shortcut has to be in the Startup directory for the user who wants to use the activity indicator.
Ideally, this should be as far as you need to come. Hopefully, the script is running correctly and starts whenever you start-up Windows.
The script is robust to the microbit being removed and then plugged back in again.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.