Simon Ford
/
LabVIEW_write_HelloWorld
A simple example for allowing LabVIEW to control the brightness of mbed LEDs
main.cpp@0:6e5663cffec2, 2010-08-02 (annotated)
- Committer:
- simon
- Date:
- Mon Aug 02 10:08:52 2010 +0000
- Revision:
- 0:6e5663cffec2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
simon | 0:6e5663cffec2 | 1 | #include "mbed.h" |
simon | 0:6e5663cffec2 | 2 | |
simon | 0:6e5663cffec2 | 3 | PwmOut myled(LED1); |
simon | 0:6e5663cffec2 | 4 | PwmOut myled2(LED2); |
simon | 0:6e5663cffec2 | 5 | |
simon | 0:6e5663cffec2 | 6 | int main() { |
simon | 0:6e5663cffec2 | 7 | while(1) { |
simon | 0:6e5663cffec2 | 8 | float brightness, brightness2; |
simon | 0:6e5663cffec2 | 9 | scanf("%f,%f", &brightness,&brightness2); |
simon | 0:6e5663cffec2 | 10 | myled = brightness; |
simon | 0:6e5663cffec2 | 11 | myled2 = brightness2; |
simon | 0:6e5663cffec2 | 12 | } |
simon | 0:6e5663cffec2 | 13 | } |