Small and fast C++ library for BBC micro:bit V2.
Clone this repository:
git clone https://github.com/ttomf/microfast.gitInstall all these tools:
clang
llvm
arm-none-eabi-gcc
arm-none-eabi-binutils
arm-none-eabi-newlib
pyocd
Create file main.cpp in folder src/ and add your code:
#include "microbit.h"
int main() {
microbit::print("Hello world!");
while (1) {
for (int i = 0; i < 100; i++) {
microbit::display::drawImage("happy");
}
for (int i = 0; i < 100; i++) {
microbit::display::drawImage("sad");
}
}
}Make to build the project:
make allOr individually:
make clean # clean up build artifacts
make compile # compile the project
make flash # flash the compiled binary to the micro:bit using pyocdThe compiled binary will be in the build/ folder (main.hex or main.bin).
This project is licensed under the GPL-2.1 License. See the LICENSE file for details.