A multifunctional and modular Firmware for Multitech's mDot based on ARM mBed provides a widerange of functionality for several Sensors such as MAX44009, BME280, MPU9250, SI1143 and uBlox. It allows you to quickly build a Sensornode that measures specific data with its sensors and sends it via LoRaWAN.
Dependencies: mDot_LoRa_Sensornode_Flowmeter_impl mbed-rtos mbed
LoRa-Sensornode Firmware for Multitech mDot
A multifunctional and modular Firmware for Multitech's mDot which provides a widerange of functionality for several Sensors. It allows you to quickly build a Sensornode that measures specific data with its sensors and sends it via LoRaWAN.
Supported Sensors
- MAX44009 (Lux Measurment) http://www.ebay.ie/itm/MAX44009-Ambient-Light-Sensor-Module-for-Arduino-with-4P-Pin-Header-/381676089124?hash=item58ddaaef24:g:-ecAAOSwzJ5XZm5E
- BME280 (Temperature, Pressure and Humdity Measurment) At the moment there are some known problem using this. https://www.adafruit.com/product/2652 https://www.amazon.com/Diymall-Pressure-Temperature-Sensor-Arduino/dp/B0118XCKTG
- MPU9250 (Acceleration, Gyroscope and Magnetometer) http://www.watterott.com/de/9-DOF-IMU-Module-With-MPU-9250
- Si1143 (Proximity up to 50cm) https://moderndevice.com/product/si1143-proximity-sensors/
- uBlox M8Q (GPS Position) http://www.dx.com/de/p/gygpsv3-m8n-u-blox-neo-m8n-001-flight-controller-gps-module-blue-394557#.V4lFW-uLRhE
Idea
The Firmware has some predefined Application Modes running different Tasks(Measurements). Each mode can be used in a different Scenario. Application_Modes define which sensors are used, how often they aquire data and how often the data has to be sent via LoRa. Lets say you just want to measure the Light then you choose an Application_Mode (or define one) that only runs TaskLight for light measurement. As a standard all measurements are taken every second and sent via LoRa but you can change that interval depending on your usage Scenario
Diff: app/SI1143Config.cpp
- Revision:
- 0:f2815503561f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/SI1143Config.cpp Wed Jul 06 20:40:36 2016 +0000 @@ -0,0 +1,65 @@ +/* + * SI1143Config.cpp + * + * Created on: 02.06.2016 + * Author: Adrian + */ + +#include "SI1143Config.h" + +SI1143Config::SI1143Config() { + // TODO Auto-generated constructor stub + +} + +SI1143Config::~SI1143Config() { + // TODO Auto-generated destructor stub +} + +void SI1143Config::build(SI1143_MODE desiredMode){ + switch(desiredMode){ + case SI1143_MODE_1: + setLed1Voltage(SI1143_LED_VOLTAGE_50_MV); + break; + case SI1143_MODE_2: + setLed1Voltage(SI1143_LED_VOLTAGE_185_MV); + break; + case SI1143_MODE_3: + setLed1Voltage(SI1143_LED_VOLTAGE_410_MV); + break; + case SI1143_MODE_4: + setLed1Voltage(SI1143_LED_VOLTAGE_410_MV); + setInterruptEnable(SI1143_PS1_IRQ_EN_MASK); + setProximitySensing1Threshold(SI1143_THRESHOLD_1000); + break; + + } +} + +uint8_t SI1143Config::getLed1Voltage(){ + return led1Voltage; +} + +uint8_t SI1143Config::getProximitySensing1Threshold(){ + return proximitySensing1Threshold; +} + +uint8_t SI1143Config::getInterruptEnable(){ + return interruptEnable; +} + +void SI1143Config::setLed1Voltage(uint8_t ledVoltage){ + this->led1Voltage = ledVoltage; +} + +void SI1143Config::setInterruptEnable(uint8_t interruptEnable){ + this->interruptEnable = interruptEnable; +} + +void SI1143Config::setProximitySensing1Threshold(uint16_t threshold){ + this->proximitySensing1Threshold = threshold; +} + + + +