Skip to content

Instantly share code, notes, and snippets.

@deejaygraham
Created August 31, 2017 15:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deejaygraham/8f36b21073d4f78a38ef69b5e7dcfe1b to your computer and use it in GitHub Desktop.
Save deejaygraham/8f36b21073d4f78a38ef69b5e7dcfe1b to your computer and use it in GitHub Desktop.
hello world for microbit in c++ as generated by mbed compiler
#include "MicroBit.h"
MicroBit uBit;
int main()
{
// Initialise the micro:bit runtime.
uBit.init();
// Insert your code here!
uBit.display.scroll("HELLO WORLD! :)");
// If main exits, there may still be other fibers running or registered event handlers etc.
// Simply release this fiber, which will mean we enter the scheduler. Worse case, we then
// sit in the idle task forever, in a power efficient sleep.
release_fiber();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment