Régulateur de type TOR

Dependencies:   mbed C12832

Files at this revision

API Documentation at this revision

Comitter:
Bleiz038
Date:
Tue Dec 18 19:14:59 2018 +0000
Commit message:
d

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
diff -r 000000000000 -r ed19fac586ff C12832.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/C12832.lib	Tue Dec 18 19:14:59 2018 +0000
@@ -0,0 +1,1 @@
+http://os.mbed.com/users/chris/code/C12832/#7de323fa46fe
diff -r 000000000000 -r ed19fac586ff main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Dec 18 19:14:59 2018 +0000
@@ -0,0 +1,37 @@
+#include "mbed.h"
+#include "C12832.h"
+
+DigitalOut Lampe(p18);
+AnalogIn Capteur(p17);
+AnalogIn p1(p19);
+float temp = 0;
+float gettemp = 0;
+C12832 lcd(p5, p7, p6, p8, p11);
+int Tc = 35;
+int e = 1;
+bool x = false;
+int main() {
+    lcd.cls();
+    lcd.locate(0,8);
+    lcd.printf("Temperature TC : %d",Tc);
+    lcd.locate(0,16);
+    lcd.printf("Hystérésis : %d",e);
+    while(1) {
+        e = p1*10+1;
+        lcd.locate(0,16);
+        lcd.printf("Hystérésis : %d",e);
+        gettemp =Capteur;
+        temp = gettemp*330;
+        lcd.locate(0,0);
+        lcd.printf("Temperature : %6.3f",temp);
+        wait(0.1);
+        if (temp < Tc-e && x == false) {
+            Lampe = 1;
+            x=true;
+            }
+        if (temp > Tc+e && x) {
+            Lampe=0;
+            x=false;
+            }
+    }
+}
diff -r 000000000000 -r ed19fac586ff mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Dec 18 19:14:59 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/3a7713b1edbc
\ No newline at end of file