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.

/media/uploads/mitea1/logo-lora-600x370.png /media/uploads/mitea1/mt_mdot_family_642px.png

Supported Sensors

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

app/I2C_RT.h

Committer:
mitea1
Date:
2018-11-02
Revision:
10:4051c38bf73f
Parent:
0:f2815503561f

File content as of revision 10:4051c38bf73f:

/**
 * @file I2C_RT.h
 *
 * @author Adrian
 * @date 19.05.2016
 */

#ifndef APP_I2C_RT_H_
#define APP_I2C_RT_H_

#include <I2C.h>
#include <rtos.h>


/**
 * @class I2C_RT
 * @brief Controls the I2C device of the mDot. mbed::I2C functionality is wrapped
 * inside it's methods. It's possible to wrap other I2C functionality from different Libraries
 * or write an own implementation.
 */
class I2C_RT{
public:
	I2C_RT();
	virtual ~I2C_RT();

	/**
	 * @brief Reads data from a specific register
	 * @param address		address of the I2C Slave device
	 * @param reg			register from which the data has to be read
	 * @param twoBytes		defines if two Bytes at once has to be read
	 * @param readData		storage for the read Data
	 * @param dataLength	length of the storage in bytes
	 */
	void read_RT(uint8_t address, uint16_t reg, bool twoBytes, uint8_t* readData, uint8_t dataLength);

	/**
	 * @brief Write data to a specific register
	 * @param address 		address of the I2C Slave device
	 * @param reg			register where the data has to be write
	 * @param twoBytes		defines if two bytes at once has to be write
	 * @param dataToWrite	the actual data that has to be written
	 * @param dataLenght	the length of the data in bytes
	 */
	void write_RT(uint8_t address,uint16_t reg, bool twoBytes ,uint8_t* dataToWrite ,uint8_t dataLenght);

private:



};

#endif /* APP_I2C_RT_H_ */