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
main.cpp
00001 #include "mbed.h" 00002 /* 00003 * All the LEDs on the micro:bit are part of the LED Matrix, 00004 * In order to get simple blinking behaviour, we set column 0 00005 * to be permanently at ground. If you want to use the LEDs as 00006 * a screen, there is a display driver in the micro:bit 'DAL', 00007 */ 00008 DigitalOut col0(P0_4, 0); 00009 00010 DigitalOut myled(P0_13); 00011 00012 int main() { 00013 while(1) { 00014 myled = 1; 00015 wait(0.2); 00016 myled = 0; 00017 wait(0.2); 00018 } 00019 }
Generated on Tue Jul 12 2022 15:22:30 by 1.7.2