![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
IT Tralee Life Long Learning 2020 Instrumentation, Monitoring and Control Module Laboratory Session
Diff: LAB_2.2.cpp
- Revision:
- 0:160adfe0ded8
diff -r 000000000000 -r 160adfe0ded8 LAB_2.2.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LAB_2.2.cpp Mon Jul 27 19:40:37 2020 +0000 @@ -0,0 +1,21 @@ +#include "mbed.h" +#include "C12832.h" + +PwmOut led1(LED1); +AnalogIn pot1(p19); +float pressure; +C12832 lcd(p5, p7, p6, p8, p11); + + int main() { + while(1) { + pressure = led1 = pot1; + wait(0.01); + lcd.locate(0,0); + lcd.printf("Pressure = %.2f", pressure); + lcd.locate(15,11); + lcd.printf("Temperature = %.3e", pressure); + lcd.locate(0,23); + lcd.printf("Force = %.4f", pressure); + + } +} \ No newline at end of file