A simple example for allowing LabVIEW to control the brightness of mbed LEDs

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 PwmOut myled(LED1);
00004 PwmOut myled2(LED2);
00005 
00006 int main() {
00007     while(1) {
00008         float brightness, brightness2;
00009         scanf("%f,%f", &brightness,&brightness2);
00010         myled = brightness;
00011         myled2 = brightness2;
00012     }
00013 }