lcd and rgb control

Dependencies:   C12832

main.cpp

Committer:
aarondegroote
Date:
2020-02-10
Revision:
7:d0c7ac271ec6
Parent:
6:f8cb706c480c

File content as of revision 7:d0c7ac271ec6:

#include "mbed.h"

#include "C12832.h"



  
C12832 lcd(D11, D13, D12, D7, D10);
AnalogIn pot1 (A0);
AnalogIn pot2 (A1);
PwmOut r (D5);
PwmOut g (D8);
PwmOut b (D9);


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