FF1705 support added

Dependencies:   libxDot-dev-mbed5-deprecated ISL29011

Fork of Dot-Examples by MultiTech

Dot-Examples rev. 31:7ec180e84cb6 have been tested with xdot-library 3.0.0-19-gb6c0ba2 and mbed-os-5.6.2

Files at this revision

API Documentation at this revision

Comitter:
gorazdko
Date:
Thu Oct 12 11:50:40 2017 +0000
Parent:
26:79d1af6752dd
Child:
28:45167939ce5e
Commit message:
test auto ota example on ff1705 ok

Changed in this revision

examples/example_config.h Show annotated file Show diff for this revision Revisions of this file
examples/src/auto_ota_example.cpp Show annotated file Show diff for this revision Revisions of this file
libxDot-dev-mbed5.lib Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
--- a/examples/example_config.h	Wed Sep 06 08:12:24 2017 +0000
+++ b/examples/example_config.h	Thu Oct 12 11:50:40 2017 +0000
@@ -9,7 +9,7 @@
 
 // the active example is the one that will be compiled
 #if !defined(ACTIVE_EXAMPLE)
-#define ACTIVE_EXAMPLE  OTA_EXAMPLE
+#define ACTIVE_EXAMPLE  AUTO_OTA_EXAMPLE
 #endif
 
 // the active channel plan is the one that will be compiled
--- a/examples/src/auto_ota_example.cpp	Wed Sep 06 08:12:24 2017 +0000
+++ b/examples/src/auto_ota_example.cpp	Thu Oct 12 11:50:40 2017 +0000
@@ -42,8 +42,10 @@
 
 Serial pc(USBTX, USBRX);
 
+
 #ifdef TARGET_FF1705_L151CC
-uint16_t lux[3]={1,2,3};
+AnalogIn lux(A0);
+#elif defined(TARGET_XDOT_L151CC)
 I2C i2c(I2C_SDA, I2C_SCL);
 ISL29011 lux(i2c);
 #else
@@ -136,18 +138,9 @@
             join_network();
         }
 
-#ifdef TARGET_FF1705_L151CC
-       // get some dummy data and send it to the gateway
-       static int cnt = 0;
-       light = lux[cnt++];
-       if (cnt >= sizeof(lux)) cnt=0;
-            
-       tx_data.push_back((light >> 8) & 0xFF);
-       tx_data.push_back(light & 0xFF);
-       logInfo("light: %lu [0x%04X]", light, light);
-       send_data(tx_data);
+
        
-#elif defined(TARGET_XDOT_L151CC)
+#if defined(TARGET_XDOT_L151CC) && !defined(TARGET_FF1705_L151CC)
         // configure the ISL29011 sensor on the xDot-DK for continuous ambient light sampling, 16 bit conversion, and maximum range
         lux.setMode(ISL29011::ALS_CONT);
         lux.setResolution(ISL29011::ADC_16BIT);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libxDot-dev-mbed5.lib	Thu Oct 12 11:50:40 2017 +0000
@@ -0,0 +1,1 @@
+http://os.mbed.com/teams/MultiTech/code/libxDot-dev-mbed5/#8c938c4e4b6a
--- a/mbed-os.lib	Wed Sep 06 08:12:24 2017 +0000
+++ b/mbed-os.lib	Thu Oct 12 11:50:40 2017 +0000
@@ -1,1 +1,1 @@
-https://github.com/ARMmbed/mbed-os/#fc1836545dcc2fc86f03b01292b62bf2089f67c3
+https://github.com/ARMmbed/mbed-os/#6e0d01cd13e8aca7bf4d697c3699ec9225386881