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: 4DGL-uLCD-SE MLX90614 mbed
Revision 0:8c4f29688d9d, committed 2016-04-29
- Comitter:
- TimothyY
- Date:
- Fri Apr 29 01:08:48 2016 +0000
- Commit message:
- TxFinal
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/4DGL-uLCD-SE.lib Fri Apr 29 01:08:48 2016 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/4180_1/code/4DGL-uLCD-SE/#e39a44de229a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MLX90614.lib Fri Apr 29 01:08:48 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/aquahika/code/MLX90614/#dcd4fe76bd13
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Apr 29 01:08:48 2016 +0000
@@ -0,0 +1,51 @@
+#include "mbed.h"
+#include "mlx90614.h"
+#include "uLCD_4DGL.h"
+
+I2C i2c(p28,p27); //sda,scl
+
+MLX90614 IR_thermometer(&i2c);
+//setup an MLX90614 using MLX90614 library from
+// http://mbed.org/users/aquahika/libraries/MLX90614/lsixz6
+
+DigitalIn sw(p20);
+
+Serial pc(USBTX, USBRX);
+
+Serial xbee1(p9,p10);
+
+uLCD_4DGL uLCD(p13,p14,p11);
+
+DigitalOut myled(LED1);
+DigitalOut myled3(LED3);//Create variable for Led 3 on the mbed
+
+int main() {
+
+ sw.mode(PullUp);
+
+ float current_temp = 0.0;
+
+ wait(5.0);
+ uLCD.printf("Your temp is:");
+ while (1) {
+ wait(1.0);
+ myled=1; // if led1 on - waiting on I2C
+ if (IR_thermometer.getTemp(¤t_temp)) {
+ //gets temperature from sensor via I2C bus
+
+ if (sw == 1) {
+ xbee1.printf("%d \n\r", (int) current_temp);
+ }
+ //pc.printf("data %d \n\r", (int) current_temp);
+ myled=0;
+ uLCD.text_height(3);
+ uLCD.text_width(3);
+ uLCD.locate(1,2);
+ uLCD.printf("%d C", (int) current_temp);
+ wait(0.3);
+ myled3=1;
+ wait(1.0);
+ //wait for device to produce next temperature reading
+ }
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Apr 29 01:08:48 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/082adc85693f \ No newline at end of file