Skip to content

ttomf/microfast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Micro:fast

Small and fast C++ library for BBC micro:bit V2.

Get Started

Clone this repository:

git clone https://github.com/ttomf/microfast.git

Install 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 all

Or individually:

make clean # clean up build artifacts
make compile # compile the project
make flash # flash the compiled binary to the micro:bit using pyocd

The compiled binary will be in the build/ folder (main.hex or main.bin).

License

This project is licensed under the GPL-2.1 License. See the LICENSE file for details.

Releases

No releases published

Packages

 
 
 

Contributors