first test

Dependencies:   microbit

Committer:
handreas
Date:
Sun Mar 01 06:55:48 2020 +0000
Revision:
0:f464d6127a87
first test

Who changed what in which revision?

UserRevisionLine numberNew contents of line
handreas 0:f464d6127a87 1 #include "MicroBit.h"
handreas 0:f464d6127a87 2
handreas 0:f464d6127a87 3 MicroBit uBit;
handreas 0:f464d6127a87 4 const uint8_t heart[] = { 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, }; // a cute heart
handreas 0:f464d6127a87 5 MicroBitImage im(10,5,heart);
handreas 0:f464d6127a87 6
handreas 0:f464d6127a87 7 int main()
handreas 0:f464d6127a87 8 {
handreas 0:f464d6127a87 9 uBit.init();
handreas 0:f464d6127a87 10 for (int i=0;i<2;i++) {
handreas 0:f464d6127a87 11 uBit.display.scroll("HELLO WORLD!");
handreas 0:f464d6127a87 12 uBit.display.print(im);
handreas 0:f464d6127a87 13 uBit.sleep(500);
handreas 0:f464d6127a87 14 }
handreas 0:f464d6127a87 15 uBit.display.clear();
handreas 0:f464d6127a87 16 release_fiber();
handreas 0:f464d6127a87 17 }