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:5756180e6eed, committed 2015-04-17
- Comitter:
- stefan1691
- Date:
- Fri Apr 17 18:44:29 2015 +0000
- Commit message:
- Temperatur Sensor (extern)
Changed in this revision
diff -r 000000000000 -r 5756180e6eed DHT.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DHT.lib Fri Apr 17 18:44:29 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/teams/components/code/DHT/#df22ddf10d75
diff -r 000000000000 -r 5756180e6eed main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Apr 17 18:44:29 2015 +0000
@@ -0,0 +1,29 @@
+/** Temperatur Sensor (extern)
+ */
+#include "mbed.h"
+#include "DHT.h"
+
+DHT sensor( A5, DHT11 );
+
+int main()
+{
+ int rc = 0;
+ float h = 0.0f, c = 0.0f, k = 0.0f, dp = 0.0f;
+
+ while( 1 )
+ {
+ wait( 2.0 );
+ rc = sensor.readData();
+ if ( rc == 0 )
+ {
+ c = sensor.ReadTemperature(CELCIUS);
+ k = sensor.ReadTemperature(KELVIN);
+ h = sensor.ReadHumidity();
+ dp = sensor.CalcdewPoint(c, h);
+ printf("Temperator in Kelvin: %4.2f, Celcius: %4.2f, ", k, c);
+ printf("Luftfeuchtigkeit is %4.2f, Taupunkt: %4.2f\n", h, dp);
+ }
+ else
+ return ( -1 ); // Fehler - Programm beenden
+ }
+}
\ No newline at end of file
diff -r 000000000000 -r 5756180e6eed mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Apr 17 18:44:29 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/433970e64889 \ No newline at end of file