microbit-samples: Added an example using our new, componentised DAL.
This commit is contained in:
parent
1d39a50e2a
commit
e8b37cb2fc
4 changed files with 35 additions and 0 deletions
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
build
|
||||
.yotta.json
|
||||
yotta_targets
|
||||
yotta_modules
|
3
README.md
Normal file
3
README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# microbit-samples
|
||||
|
||||
[insert documentation URL here, when we are live]
|
11
module.json
Normal file
11
module.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"name": "microbit-samples",
|
||||
"version": "0.0.1",
|
||||
"description": "The micro:bit runtime common abstraction with examples.",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"microbit": "lancaster-university/microbit#component-refactor"
|
||||
},
|
||||
"targetDependencies": {},
|
||||
"bin": "./source"
|
||||
}
|
17
source/main.cpp
Normal file
17
source/main.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include "MicroBit.h"
|
||||
|
||||
MicroBit uBit;
|
||||
|
||||
int main()
|
||||
{
|
||||
// Initialise the micro:bit runtime.
|
||||
uBit.init();
|
||||
|
||||
// Insert your code here!
|
||||
uBit.display.scroll("BELLO! :)");
|
||||
|
||||
// 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();
|
||||
}
|
Loading…
Reference in a new issue