tomasz_gurajek

Dependencies:   mbed C12832

Committer:
t00204088
Date:
Sat Aug 01 12:02:52 2020 +0000
Revision:
0:942b9e3e8a51
tomasz_gurajek

Who changed what in which revision?

UserRevisionLine numberNew contents of line
t00204088 0:942b9e3e8a51 1 #include "mbed.h"
t00204088 0:942b9e3e8a51 2 #include "C12832.h"
t00204088 0:942b9e3e8a51 3 C12832 lcd(p5, p7, p6, p8, p11);
t00204088 0:942b9e3e8a51 4 PwmOut led1(LED1);
t00204088 0:942b9e3e8a51 5 AnalogIn pot1(p19);
t00204088 0:942b9e3e8a51 6 int main() {
t00204088 0:942b9e3e8a51 7 while(1) {
t00204088 0:942b9e3e8a51 8 led1 = pot1;
t00204088 0:942b9e3e8a51 9 wait(0.01);
t00204088 0:942b9e3e8a51 10 lcd.locate(0,0); //brings the cursor on the LCD display back to the top left corner
t00204088 0:942b9e3e8a51 11 lcd.printf("Value = %.2f\n\r",pot1.read()); // displays the value on the LCD
t00204088 0:942b9e3e8a51 12 lcd.printf("Value = %.2e\n\r",pot1.read()); // displays the value on the LCD
t00204088 0:942b9e3e8a51 13 }
t00204088 0:942b9e3e8a51 14 }