David Mc Sherry / Mbed 2 deprecated INS_LAB_Q2

Dependencies:   mbed C12832

Files at this revision

API Documentation at this revision

Comitter:
t00214916
Date:
Wed Aug 18 15:08:39 2021 +0000
Commit message:
Potentiometer experiment

Changed in this revision

C12832.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/C12832.lib	Wed Aug 18 15:08:39 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/chris/code/C12832/#7de323fa46fe
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Aug 18 15:08:39 2021 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+#include "C12832.h" // LCD on Mbed
+
+PwmOut led1 (LED1); // Control the brightness of LED1
+AnalogIn pot1 (p19);    //Used to change brightness 
+C12832 lcd(p5, p7, p6, p8, p11);    // Register the pins needed for LCD
+
+int main()
+{
+    
+    while(1) { 
+    led1 = pot1;    // LED1 the same value as POT1
+    lcd.locate(0,0);    // Area on LCD to start text
+    lcd.printf("Potentiometer value 1 = %.2f", pot1.read());
+    
+    lcd.locate(0,10);
+    lcd.printf("Potentiometer value 2 = %.2e", pot1.read());
+    
+    wait(0.5);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Aug 18 15:08:39 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file