Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of TextLCD by
Revision 9:9531b96fc3e5, committed 2018-05-18
- Comitter:
- czr
- Date:
- Fri May 18 16:20:14 2018 +0000
- Parent:
- 8:308d188a2d3a
- Commit message:
- Fan
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DS1820.lib Fri May 18 16:20:14 2018 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/Sissors/code/DS1820/#c591209285e9
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri May 18 16:20:14 2018 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+#include "TextLCD.h"
+#include "DS1820.h"
+
+TextLCD lcd(p19,p20,p21,p22,p23,p24);
+DS1820 probe(p16);
+PwmOut Fan(p25);
+
+int main(){
+ Fan.period(0.0001);
+ while(1){
+ probe.convertTemperature(true,DS1820::all_devices);
+ lcd.cls();
+ lcd.printf("The temperature is %.2foC ",probe.temperature());
+ if(probe.temperature()>32){
+ Fan = 1.0;}
+ else if (probe.temperature()>=29){
+ Fan = 0.3;}
+ else {
+ Fan = 0.1;}
+ }
+ }
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri May 18 16:20:14 2018 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/e1686b8d5b90 \ No newline at end of file
