Send file data through D7A Action Protocol demo.

Dependencies:   modem_ref_helper

Revision:
0:3058da317f01
Child:
5:4da1ea72e7b4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sensor.cpp	Thu May 11 14:49:14 2017 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+#include "hwcfg.h"
+#include "sensor.h"
+#include "WizziDebug.h"
+
+
+
+AnalogIn g_light_meas(SENSOR_LIGHT_MEAS);
+DigitalOut g_light_en_l(SENSOR_LIGHT_EN);
+
+
+uint8_t sensor_get_light(void)
+{
+    uint8_t light_level = 0;
+    
+    // Enable light sensor
+    g_light_en_l = 0;
+    
+    Thread::wait(10);
+    
+    // Read light value
+    light_level = (uint8_t)(100*g_light_meas);
+    
+    // Disable light sensor
+    g_light_en_l = 1;
+    
+    return light_level;
+}
\ No newline at end of file