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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SensorsMain.cpp Source File

SensorsMain.cpp

00001 #include "SensorsMain.hpp"
00002 
00003 #include "ToDoQ.h"
00004 
00005 SensorsMain::SensorsMain()
00006 {
00007     read();
00008 }
00009 
00010 void
00011 SensorsMain::go()
00012 {
00013 #if defined (TARGET_KL25Z)
00014     SENSORS::ACTIVE[SENSORS::COLOR] == true ? Color_VEML6040::getSelf()->loop() : 0;
00015     SENSORS::ACTIVE[SENSORS::TEMPERATURE] == true ? Temperature::getSelf()->loop() : 0;
00016     SENSORS::ACTIVE[SENSORS::ACCELEROMETER] == true ? Accelerometer_Sekisan::getSelf()->loop() : 0;
00017     SENSORS::ACTIVE[SENSORS::CURRENT_TRANS] == true ? CurrentTrans::getSelf()->loop() : 0;
00018     if(SENSORS::ACTIVE[SENSORS::PRESSURE] == true)
00019     {
00020         GasPressure::getSelf()->loop();
00021         LiquidPressure::getSelf()->loop();
00022     }
00023     //SERIAL_PRINT_DBG_FUNCNAME();
00024 #elif defined (TARGET_TEENSY3_1)
00025     SENSORS::ACTIVE[SENSORS::ACCELEROMETER] == true ? Accelerometer::getInstance()->loop() : Accelerometer::deleteInstance();
00026 #endif
00027 }