yahboom test

Dependencies:   microbit

Committer:
lzty634158
Date:
Thu Apr 26 07:19:16 2018 +0000
Revision:
0:1009e68c4eff
????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lzty634158 0:1009e68c4eff 1 /*
lzty634158 0:1009e68c4eff 2 The MIT License (MIT)
lzty634158 0:1009e68c4eff 3
lzty634158 0:1009e68c4eff 4 Copyright (c) 2016 British Broadcasting Corporation.
lzty634158 0:1009e68c4eff 5 This software is provided by Lancaster University by arrangement with the BBC.
lzty634158 0:1009e68c4eff 6
lzty634158 0:1009e68c4eff 7 Permission is hereby granted, free of charge, to any person obtaining a
lzty634158 0:1009e68c4eff 8 copy of this software and associated documentation files (the "Software"),
lzty634158 0:1009e68c4eff 9 to deal in the Software without restriction, including without limitation
lzty634158 0:1009e68c4eff 10 the rights to use, copy, modify, merge, publish, distribute, sublicense,
lzty634158 0:1009e68c4eff 11 and/or sell copies of the Software, and to permit persons to whom the
lzty634158 0:1009e68c4eff 12 Software is furnished to do so, subject to the following conditions:
lzty634158 0:1009e68c4eff 13
lzty634158 0:1009e68c4eff 14 The above copyright notice and this permission notice shall be included in
lzty634158 0:1009e68c4eff 15 all copies or substantial portions of the Software.
lzty634158 0:1009e68c4eff 16
lzty634158 0:1009e68c4eff 17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
lzty634158 0:1009e68c4eff 18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
lzty634158 0:1009e68c4eff 19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
lzty634158 0:1009e68c4eff 20 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
lzty634158 0:1009e68c4eff 21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
lzty634158 0:1009e68c4eff 22 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
lzty634158 0:1009e68c4eff 23 DEALINGS IN THE SOFTWARE.
lzty634158 0:1009e68c4eff 24 */
lzty634158 0:1009e68c4eff 25
lzty634158 0:1009e68c4eff 26 #include "MicroBit.h"
lzty634158 0:1009e68c4eff 27
lzty634158 0:1009e68c4eff 28 MicroBit uBit;
lzty634158 0:1009e68c4eff 29
lzty634158 0:1009e68c4eff 30 int main()
lzty634158 0:1009e68c4eff 31 {
lzty634158 0:1009e68c4eff 32 // Initialise the micro:bit runtime.
lzty634158 0:1009e68c4eff 33 uBit.init();
lzty634158 0:1009e68c4eff 34
lzty634158 0:1009e68c4eff 35 // Insert your code here!
lzty634158 0:1009e68c4eff 36 uBit.display.scroll("HELLO YahBoom!");
lzty634158 0:1009e68c4eff 37
lzty634158 0:1009e68c4eff 38
lzty634158 0:1009e68c4eff 39 // If main exits, there may still be other fibers running or registered event handlers etc.
lzty634158 0:1009e68c4eff 40 // Simply release this fiber, which will mean we enter the scheduler. Worse case, we then
lzty634158 0:1009e68c4eff 41 // sit in the idle task forever, in a power efficient sleep.
lzty634158 0:1009e68c4eff 42 release_fiber();
lzty634158 0:1009e68c4eff 43 }
lzty634158 0:1009e68c4eff 44