pwm period is now 200us instead of the default 20ms veml6040 config is now AF_BIT | TRIG_BIT

Dependencies:   mbed MMA8451Q USBDevice WakeUp vt100

Fork of afero_node_suntory_2017_06_15 by Orefatoi

Revision:
2:dfe671e31221
Parent:
1:b2a9a6f2c30e
Child:
5:9d5c7ee80f3b
--- a/main.cpp	Thu Jan 19 09:17:16 2017 +0000
+++ b/main.cpp	Tue Jan 24 10:00:28 2017 +0000
@@ -4,12 +4,41 @@
 #include "debugIO.h"
 #include "RTC_Handler.h"
 #include "Preferences.hpp"
+#include "WakeUp.h"
 
 Timer t;
+/*
+template<typename A> class DebugIO
+{
+    static A* self;
+public:
+    template<typename... Args> void printf(Args... args)
+    {
+        self->mof(args...);
+    }
+};
 
+template<typename A> A* DebugIO<A>::self = NULL;
+
+class DBGO : public DebugIO<DBGO>
+{
+public:
+    void mof(const char* fmt, ...)
+    {
+        va_list args;
+        va_start(args,fmt);
+        vprintf(fmt,args);
+        va_end(args);
+    }
+};
+*/
 int
 main()
 {
+//    DBGO dbgo;
+//    dbgo.printf("hi");
+    WakeUp::calibrate();
+    wait_ms(1000);
     t.start();
     initDebugIO();
     RTC_Handler::getInstance()->setUTC(1483228800);