Praktikum1_7_AMSL
Dependencies: C12832_lcd mbed
Diff: main.cpp
- Revision:
- 0:9419a34f07b4
diff -r 000000000000 -r 9419a34f07b4 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Mar 07 18:51:47 2018 +0000 @@ -0,0 +1,49 @@ +#include "mbed.h" +#include "C12832_lcd.h" + +// LCD and Joystick Setting +C12832_LCD lcd; + +BusIn Up(p15); +BusIn Down(p12); +BusIn Left(p13); +BusIn Right(p16); +BusOut Reset(p14); + +unsigned short poti =0; + +// Custom Function +void initialize(); +void LCD_Anzeige(); + +AnalogIn input(p19); + +// Main +int main() +{ + initialize(); + while(1) + { + + poti= input.read_u16(); + LCD_Anzeige(); + wait(0.1); + } +} +void initialize() +{ + lcd.cls(); + lcd.locate(0,0); + lcd.printf("Hallo Bielefeld!"); +} + + +void LCD_Anzeige(){ + lcd.cls(); + lcd.locate(0,0); + lcd.printf("Hallo Bielefeld!"); + lcd.locate(0,15); // Set Location print a text + // Operations by Joystic + lcd.printf("%u",poti); + + } \ No newline at end of file