T00221592 Potentiometer experiment Winter Lab 1

Dependencies:   mbed C12832

Committer:
t00221592
Date:
Tue Dec 21 10:04:43 2021 +0000
Revision:
0:5e913f53cbb7
T00221592 Instrumentation Winter Lab 1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
t00221592 0:5e913f53cbb7 1 #include "mbed.h"
t00221592 0:5e913f53cbb7 2 #include "C12832.h"
t00221592 0:5e913f53cbb7 3 C12832 lcd(p5, p7, p6, p8, p11);
t00221592 0:5e913f53cbb7 4 PwmOut led1(LED1);
t00221592 0:5e913f53cbb7 5 AnalogIn pot1(p19);
t00221592 0:5e913f53cbb7 6 int main() {
t00221592 0:5e913f53cbb7 7 while(1) {
t00221592 0:5e913f53cbb7 8 led1 = pot1;
t00221592 0:5e913f53cbb7 9 lcd.printf("%.1f", pot1.read());
t00221592 0:5e913f53cbb7 10 lcd.printf("%.1e", pot1.read());
t00221592 0:5e913f53cbb7 11 wait(1);
t00221592 0:5e913f53cbb7 12 lcd.locate(0,0);
t00221592 0:5e913f53cbb7 13 lcd.locate(0,0);
t00221592 0:5e913f53cbb7 14 }
t00221592 0:5e913f53cbb7 15 }