Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: CRC16 FreescaleIAP FreescaleWatchdog GGSProtocol LM75B PIMA Parameters PersistentCircularQueue SerialNumberV2COM mbed-dev-watchdog_2016_03_04
Fork of smartRamalKW by
sensor.cpp
- Committer:
- tpadovani
- Date:
- 2015-06-22
- Revision:
- 7:fe8e827f4d1b
- Parent:
- 5:1bc98277c257
- Child:
- 8:e8d86c66283c
File content as of revision 7:fe8e827f4d1b:
#include "sensor.h"
extern AnalogIn voltage;
extern ParametersBlock APP_PARAMETERS;
bool getEstadoSensor(){
float limit = APP_PARAMETERS.LIMITE_TENSAO_SENSOR_V * 0.01;
if(voltage > limit){
return SENSOR_COM_FORNECIMENTO;
} else{
return SENSOR_SEM_FORNECIMENTO;
}
}
