Dariusz Piskorowski / Mbed 2 deprecated PwmLed_and_Potentiometer

Dependencies:   mbed C12832_lcd

Files at this revision

API Documentation at this revision

Comitter:
Dariusz_Piskorowski
Date:
Sun Aug 11 01:42:19 2019 +0000
Commit message:
RB_Led-and-Potentiometer

Changed in this revision

C12832_lcd.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_lcd.lib	Sun Aug 11 01:42:19 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/dreschpe/code/C12832_lcd/#8f86576007d6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Aug 11 01:42:19 2019 +0000
@@ -0,0 +1,25 @@
+#include "mbed.h"
+#include "C12832_lcd.h"
+
+C12832_LCD lcd;
+
+PwmOut red(p23);
+PwmOut green(p24);
+AnalogIn pot1(p19);
+AnalogIn pot2(p20);
+
+float pot1val, pot2val;
+
+int main() {
+    while(1) {
+        pot1val=pot1.read();
+        pot2val=pot2.read();
+        red=pot1val;
+        green=pot2val;
+        lcd.cls();
+        lcd.locate(0,4);
+        lcd.printf("pot1= %.3f %.3f V / pot2= %.3f %.3f V\n",
+        1-pot1val, 3.3-pot1val*3.3, 1-pot2val, 3.3-pot2val*3.3 );
+        wait(0.5);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Aug 11 01:42:19 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file