Example program that uses the color LED of the mbed application shield (via arduino headers) with ST Nucleo board

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 DigitalOut red(D5);
00004 DigitalOut blue(D8);
00005 DigitalOut green(D9);
00006 int i;
00007 
00008 int main() {
00009     while(1) {
00010         for (i=1; i<7; i++) {
00011             red = i & 1;
00012             blue = i & 2;
00013             green = i & 4;
00014             wait(0.2);
00015         }
00016     }
00017 }