Initial

Dependencies:   BLE_API mbed nRF51822

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 DigitalOut greenLED(P0_22);
00004 DigitalOut blueled(P0_23);
00005 
00006 int main() {
00007     while(1) {
00008         greenLED = 0; // LED is ON
00009         wait(0.2); // 200 ms
00010         greenLED = 1; // LED is OFF
00011         wait(1.0); // 1 sec
00012         blueled = 0; // LED is ON
00013         wait(0.2); // 200 ms
00014         blueled = 1; // LED is OFF
00015         wait(1.0); // 1 sec
00016     }
00017 }