Test program for mbed app shield pots

Dependencies:   C12832 mbed

Fork of mbed-app-shield by Chris Styles

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 
00004 C12832 lcd(D11, D13, D12, D7, D10);
00005 
00006 AnalogIn pot1 (A0);
00007 AnalogIn pot2 (A1);
00008 
00009 int main()
00010 {
00011     while(1) {
00012         lcd.cls();
00013         lcd.locate(0,3);
00014         lcd.printf("Pot 1 = %.2f", (float)pot1);
00015         lcd.locate(0,14);
00016         lcd.printf("Pot 2 = %.2f", (float)pot2);
00017         wait(0.1);
00018     }
00019 }