test program for mbed Lab Board
Dependencies: C12832_lcd LCD_fonts mbed-rtos mbed
Test program for the mbed application board. It use the mbed rtos to create 5 threads.
Two threads are counting, one setup the contrast with pot 1, one is printing a rotating sinwave and the last prints the actual contrast.
Revision 3:3ec443c0842a, committed 2012-12-05
- Comitter:
- dreschpe
- Date:
- Wed Dec 05 08:06:20 2012 +0000
- Parent:
- 2:a69c8c5f5b03
- Commit message:
- the lcd lib is not claiming the printf now, so we have to call LCD.printf
Changed in this revision
diff -r a69c8c5f5b03 -r 3ec443c0842a C12832_lcd.lib --- a/C12832_lcd.lib Fri Oct 26 18:18:33 2012 +0000 +++ b/C12832_lcd.lib Wed Dec 05 08:06:20 2012 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/dreschpe/code/C12832_lcd/#468cdccff7af +http://mbed.org/users/dreschpe/code/C12832_lcd/#8d812da33cdc
diff -r a69c8c5f5b03 -r 3ec443c0842a main.cpp --- a/main.cpp Fri Oct 26 18:18:33 2012 +0000 +++ b/main.cpp Wed Dec 05 08:06:20 2012 +0000 @@ -11,7 +11,7 @@ #include "C12832_lcd.h" // LCD object -C12832_LCD LCD("LCD"); +C12832_LCD LCD; AnalogIn Pot1(p19); AnalogIn Pot2(p20); @@ -29,7 +29,7 @@ lcd_mutex.lock(); LCD.locate(0,0); LCD.set_font((unsigned char*) Small_6); - printf("Thread1 count: %d",i); + LCD.printf("Thread1 count: %d",i); lcd_mutex.unlock(); i++; Thread::wait(1000); @@ -45,7 +45,7 @@ lcd_mutex.lock(); LCD.locate(0,20); LCD.set_font((unsigned char*) Arial_9); - printf("Thread 2 count : %d",k); + LCD.printf("Thread 2 count : %d",k); lcd_mutex.unlock(); k++; Thread::wait(500); // wait 0.5s @@ -111,7 +111,7 @@ LCD.locate(0,9); LCD.set_font((unsigned char*) Small_7); j = LCD.get_contrast(); // read the actual contrast - printf("contrast : %d",j); + LCD.printf("contrast : %d",j); lcd_mutex.unlock(); Thread::wait(500); // wait 0.5s }
diff -r a69c8c5f5b03 -r 3ec443c0842a mbed-rtos.lib --- a/mbed-rtos.lib Fri Oct 26 18:18:33 2012 +0000 +++ b/mbed-rtos.lib Wed Dec 05 08:06:20 2012 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed-rtos/#9654a71f5a90 +http://mbed.org/users/mbed_official/code/mbed-rtos/#88a1a9c26ae3
diff -r a69c8c5f5b03 -r 3ec443c0842a mbed.bld --- a/mbed.bld Fri Oct 26 18:18:33 2012 +0000 +++ b/mbed.bld Wed Dec 05 08:06:20 2012 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/e2ed12d17f06 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/b60934f96c0c \ No newline at end of file