Les bros de la fst
/
TP5P2
Régulateur de type TOR
Revision 0:ed19fac586ff, committed 2018-12-18
- Comitter:
- Bleiz038
- Date:
- Tue Dec 18 19:14:59 2018 +0000
- Commit message:
- d
Changed in this revision
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