Ewa Zalewska Q2

Dependencies:   mbed C12832

main.cpp

Committer:
t00215759
Date:
2020-07-29
Revision:
0:360702b3e8f4

File content as of revision 0:360702b3e8f4:


#include "mbed.h"
#include "C12832.h"
// declarations (global declarations)
C12832 lcd(p5, p7, p6, p8, p11);// an object ot class C 12832 LCD called LCD
PwmOut led1(LED1);// led is an Object of class PWMOut
AnalogIn pot1(p19); //pot is an Object of class AnalogIn
float g;  //g is a variable of type float

int main(){
    lcd.cls();// clear LCD screen
    lcd.locate(0,0);// Clear the screen and locate to 0,0. 
while(1) {
        led1 = pot1;
        float g = pot1;
        lcd.printf("value of pot is %f \n" , g);
        lcd.printf("value of pot is %e \n" , g);// 
        wait(0.01);
    }
}