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.
Revision 0:53fb25e6315f, committed 2018-03-29
- Comitter:
- Niranjan_ravi
- Date:
- Thu Mar 29 04:37:35 2018 +0000
- Commit message:
- Niranjan_28_March_TemperatureCode
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DHT.lib Thu Mar 29 04:37:35 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/Wimpie/code/DHT/#9b5b3200688f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Mar 29 04:37:35 2018 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+#include "DHT.h"
+
+DHT sensor(PTC16, AM2302);
+DigitalOut gpio1(PTB9);
+int main()
+{
+ int error;
+ float farenheit = 0.0f;
+ while(1)
+ {
+ wait(4);
+ error = sensor.readData();
+ farenheit = sensor.ReadTemperature(FARENHEIT);
+ printf("%f\n\r",farenheit);
+ if ( farenheit > 80 )
+ {
+ gpio1 = 1;
+ printf(" start and gpio is 1 \n");
+ }
+ else if ( farenheit >= 73 and farenheit < 80 )
+ {
+ gpio1= 0;
+ printf(" stop and gpio is 0 \n");
+ }
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Mar 29 04:37:35 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/aa5281ff4a02 \ No newline at end of file