Kevin Sullivan / Mbed 2 deprecated lab2_2

Dependencies:   mbed C12832

Committer:
kevinsullivan
Date:
Sat Jul 18 10:44:27 2020 +0000
Revision:
0:376219f61e79
Child:
1:44729c5f024a
lab 2.2

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kevinsullivan 0:376219f61e79 1 #include "mbed.h"
kevinsullivan 0:376219f61e79 2 #include "C12832.h"
kevinsullivan 0:376219f61e79 3 Serial pc(USBTX, USBRX); // tx, rx
kevinsullivan 0:376219f61e79 4 PwmOut led1(LED1);
kevinsullivan 0:376219f61e79 5 AnalogIn pot1(p19);
kevinsullivan 0:376219f61e79 6 C12832 lcd(p5,p7,p6,p8,p11);
kevinsullivan 0:376219f61e79 7 int main()
kevinsullivan 0:376219f61e79 8 {
kevinsullivan 0:376219f61e79 9 while(1) {
kevinsullivan 0:376219f61e79 10 float t = pot1;
kevinsullivan 0:376219f61e79 11 led1 = pot1;
kevinsullivan 0:376219f61e79 12 wait(0.01);
kevinsullivan 0:376219f61e79 13 lcd.locate(0,0); //brings the cursor on the LCD back to the top left corner
kevinsullivan 0:376219f61e79 14 lcd.printf("value = %.2f\n",t); // displays the value on the LCD
kevinsullivan 0:376219f61e79 15 }
kevinsullivan 0:376219f61e79 16 }