#include "mbed.h" #include "rtos.h" #include "stdio.h" #include "C12832_lcd.h" #include "C12832.h" C12832_LCD lcd; AnalogIn Ain(p20); Mutex lcd_mutex; void thread(void const *args) { int col, height,sample; float ADCdata; while(1) { lcd_mutex.lock(); for(col=0; col<128; col++) { for(sample=0; sample<101; sample++) { ADCdata = Ain*3.3; } height=31-int(ADCdata*10); lcd.pixel(col, height, 1); } lcd.copy_to_lcd(); lcd_mutex.unlock(); Thread::wait(750); lcd.cls(); } } int main() { lcd.cls(); Thread t(thread); while(1); } C12832 lcd(p5, p7, p6, p8, p11); int main() { lcd.locate(54,13); lcd.printf("Hello!"); lcd.locate(110,0); lcd.printf("wazzzzup"); }