Uses the MicroBit accelerometer information to draw images, with button A used to clear the canvas and button B used to switch between 'pen up' and 'pen down' modes. The information from the microbit is sent across via a serial connection, and to start drawing run the microbitDraw.py program. The initial template used for this MicroBit V1 C/C++ project was taken from the book "Micro:Bit Iot in C" by Harry Fairhead.
- Install the arm-none-eabi-gcc compiler
- Install Cmake
- Install ninja
- Have a V1 Micro:bit
- Install the VS code Cmake extension (if using instructions below)
- Replace any occurrence of the absolute path /home/hettysymes/Microbit with your own path to the Microbit directory.
- Clean reconfigure all projects (using Cmake extension).
- When asked to select a kit on configuring the project for the first time choose the GCC arm-none-eabi kit.
- When asked to locate the CMakeLists.txt file choose the one in the MicrobitDraw/build/bbc-microbit-classic-gcc directory.
- Build the project (using Cmake extension).
- Find build/source/MicrobitDraw-combined.hex and transfer this file to your Micro:bit. Your Micro:bit is now ready to use for drawing.
- Connect the Micro:bit to a computer via serial port.
- Run the microbitDraw.py python program on your computer. Install any relevant packages needed to do so.
- A window will pop up and you can use the Micro:bit tilt and buttons for drawing on the window.