a test code that read pot value with AnalogIn and display that on LCD of mbed Application Shield

Dependencies:   C12832 mbed

main.cpp

Committer:
ytsuboi
Date:
2016-01-22
Revision:
0:84f51e352a37

File content as of revision 0:84f51e352a37:

#include "mbed.h"
#include "C12832.h"

C12832 lcd(p5, p7, p6, p8, p11);

AnalogIn pot1 (p19);
AnalogIn pot2 (p20);

int main()
{
    while(1) {
        lcd.cls();
        lcd.locate(0,3);
        lcd.printf("Pot 1 = %.2f", (float)pot1);
        lcd.locate(0,14);
        lcd.printf("Pot 2 = %.2f", (float)pot2);
        wait(0.1);
    }
}