A blinky for the BBC micro:bit, which needs a custom blinky as there are no LEDs that aren't part of an LED matrix

Dependencies:   mbed

Committer:
JonnyA
Date:
Wed Mar 02 18:01:16 2016 +0000
Revision:
0:025387782f3e
Initial Commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JonnyA 0:025387782f3e 1 #include "mbed.h"
JonnyA 0:025387782f3e 2 /*
JonnyA 0:025387782f3e 3 * All the LEDs on the micro:bit are part of the LED Matrix,
JonnyA 0:025387782f3e 4 * In order to get simple blinking behaviour, we set column 0
JonnyA 0:025387782f3e 5 * to be permanently at ground. If you want to use the LEDs as
JonnyA 0:025387782f3e 6 * a screen, there is a display driver in the micro:bit 'DAL',
JonnyA 0:025387782f3e 7 */
JonnyA 0:025387782f3e 8 DigitalOut col0(P0_4, 0);
JonnyA 0:025387782f3e 9
JonnyA 0:025387782f3e 10 DigitalOut myled(P0_13);
JonnyA 0:025387782f3e 11
JonnyA 0:025387782f3e 12 int main() {
JonnyA 0:025387782f3e 13 while(1) {
JonnyA 0:025387782f3e 14 myled = 1;
JonnyA 0:025387782f3e 15 wait(0.2);
JonnyA 0:025387782f3e 16 myled = 0;
JonnyA 0:025387782f3e 17 wait(0.2);
JonnyA 0:025387782f3e 18 }
JonnyA 0:025387782f3e 19 }