This program consists of the software developed for the ELEC5870M Individual Project. It runs on the mbed LPC1768. It uses the mbed RTOS to perform the following tasks: - Implements intuitive GUI with buttons, LCD TFT Display and LEDs. - Serial Communication with the RPi - I2C communication with INA219 voltage current sensors - Power control at the USB ports
Dependencies: Adafruit_GFX Adafruit_ST7735 INA219 MODSERIAL MbedJSONValue mbed-rtos mbed
SensorModel.h
- Committer:
- OHstin
- Date:
- 2017-04-30
- Revision:
- 6:196a63a3378d
- Parent:
- 3:7666de697752
File content as of revision 6:196a63a3378d:
#ifndef SENSORMODEL_H #define SENSORMODEL_H /** // this class basically stores models of sensor to be used in other threads **/ // battery model class BatteryModel { public: BatteryModel(); BatteryModel(float b1C,float b1V,float b2C,float b2V); float batteryOneCurrent; float batteryOneVoltage; float batteryTwoCurrent; float batteryTwoVoltage; }; BatteryModel::BatteryModel() { } BatteryModel::BatteryModel(float b1C, float b1V, float b2C, float b2V ) { batteryOneCurrent = b1C; batteryOneVoltage = b1V; batteryTwoCurrent = b2C; batteryTwoVoltage = b2V; } // solar model class SolarModel { public: SolarModel(); SolarModel(float sV, float sC); float solarVoltage; float solarCurrent; }; SolarModel::SolarModel() { } SolarModel::SolarModel(float sV, float sC) { solarVoltage = sV; solarCurrent = sC; } // consumption model class ConsumptionModel { public: ConsumptionModel(); ConsumptionModel(float oV, float oC); float consumptionVoltage; float consumptionCurrent; }; ConsumptionModel::ConsumptionModel(float oV, float oC) { consumptionVoltage = oV; consumptionCurrent = oC; } #endif