TP7_DS_3_LCD_contrast

Dependencies:   C12832 mbed

main.cpp

Committer:
rtk
Date:
2015-11-02
Revision:
0:a47cccea14ff

File content as of revision 0:a47cccea14ff:

#include "mbed.h"
#include "C12832.h"
 
C12832 lcd(D11, D13, D12, D7, D10);
 
AnalogIn pot1 (A0);
AnalogIn pot2 (A1);
 
int main()
{
    
    while(1) {
        lcd.cls();
        lcd.locate(0,8);
        lcd.printf("Pot 1 = %.2f", (float)pot1);
        wait(0.1);
        lcd.set_contrast(pot1 * 64);
    }
}