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.
Dependencies: TextLCD mbed TMP102
Revision 0:1e8d2aa42655, committed 2011-02-06
- Comitter:
- monpjc
- Date:
- Sun Feb 06 17:37:24 2011 +0000
- Commit message:
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TMP102.lib Sun Feb 06 17:37:24 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/donatien/code/TMP102/#b469676e9a9e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.lib Sun Feb 06 17:37:24 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/simon/code/TextLCD/#e4cb7ddee0d3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sun Feb 06 17:37:24 2011 +0000
@@ -0,0 +1,54 @@
+// Hello World! for the TextLCD
+
+#include "mbed.h"
+#include "TextLCD.h"
+#include "TMP102.h"
+
+DigitalOut blue_led(LED1);
+DigitalOut speaker(p21);
+
+TMP102 temperature(p9, p10, 0x92); //A0 pin is connected to ground
+TextLCD lcd(p15, p16, p17, p18, p19, p20); // rs, e, d4-d7
+
+int main() {
+
+ char buffer[32];
+ time_t seconds = time(NULL);
+
+ set_time(1256729737);
+ printf("%s\n", buffer);
+ lcd.cls();
+ for (int i = 0 ; i <= 100 ; i += 1 )
+ {
+ speaker = !speaker;
+ wait (0.001); // 5kHz, with 10 steps
+ }
+ for (int i = 0 ; i <= 50 ; i += 1 )
+ {
+ speaker = !speaker;
+ wait (0.002); // 5kHz, with 10 steps
+ }
+
+
+ while(1)
+ {
+ lcd.cls();
+ seconds = time(NULL);
+ strftime(buffer, 32, "%X", localtime(&seconds));
+ lcd.printf("%s\n", buffer);
+ //printf("%s\n", buffer);
+ lcd.printf("Temp: %f\n", temperature.read());
+ blue_led = 1;
+ wait(0.5);
+ blue_led = 0;
+ wait(0.5);
+ }
+
+ //while (1)
+ //{
+ // speaker = !speaker;
+ // wait (0.001); // 5kHz
+ //}
+
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Feb 06 17:37:24 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/e2ac27c8e93e