tomasz_gurajek

Dependencies:   mbed C12832

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "C12832.h"
00003 C12832 lcd(p5, p7, p6, p8, p11);
00004 PwmOut led1(LED1); 
00005 AnalogIn pot1(p19); 
00006     int main() { 
00007         while(1) { 
00008         led1 = pot1; 
00009         wait(0.01); 
00010         lcd.locate(0,0); //brings the cursor on the LCD display back to the top left corner
00011         lcd.printf("Value = %.2f\n\r",pot1.read()); // displays the value on the LCD
00012         lcd.printf("Value = %.2e\n\r",pot1.read()); // displays the value on the LCD
00013     } 
00014 }