set led to common anode
Dependencies: C12832_lcd EthernetInterface LM75B MMA7660 libxively mbed-rtos mbed
Fork of xively-dreamforce by
app_board_io.cpp@19:ca595d80895b, 2013-11-11 (annotated)
- Committer:
- errordeveloper
- Date:
- Mon Nov 11 18:41:18 2013 +0000
- Revision:
- 19:ca595d80895b
- Parent:
- 15:7443df31ff5b
Control RGB led from Xively in simple way, but the colours are odd, but
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
errordeveloper | 15:7443df31ff5b | 1 | #include "mbed.h" |
xively | 7:0eff5db44b8b | 2 | #include "app_board_io.h" |
errordeveloper | 15:7443df31ff5b | 3 | |
errordeveloper | 10:86ffba646df1 | 4 | #include "C12832_lcd.h" |
xively | 7:0eff5db44b8b | 5 | |
errordeveloper | 11:bdf601a405fc | 6 | extern C12832_LCD lcd; |
xively | 7:0eff5db44b8b | 7 | |
xively | 7:0eff5db44b8b | 8 | extern "C" void lcd_printf( const char* fmt, ... ) |
xively | 7:0eff5db44b8b | 9 | { |
xively | 7:0eff5db44b8b | 10 | char buffer[ 64 ]; |
xively | 7:0eff5db44b8b | 11 | |
xively | 7:0eff5db44b8b | 12 | va_list ap; |
xively | 7:0eff5db44b8b | 13 | va_start( ap, fmt ); |
xively | 7:0eff5db44b8b | 14 | vsnprintf( buffer, 64, fmt, ap ); |
xively | 7:0eff5db44b8b | 15 | va_end( ap ); |
xively | 7:0eff5db44b8b | 16 | |
xively | 7:0eff5db44b8b | 17 | lcd.cls(); |
xively | 7:0eff5db44b8b | 18 | lcd.locate( 0, 3 ); |
xively | 7:0eff5db44b8b | 19 | lcd.printf( buffer ); |
xively | 7:0eff5db44b8b | 20 | //wait( 1.0 ); |
xively | 7:0eff5db44b8b | 21 | } |