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: ID12RFID ReportDB SalesforceCaseGenerator SalesforceInterface
Dependents: mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet ... more
Revision 21:2b85d1442d34, committed 2014-10-06
- Comitter:
- ansond
- Date:
- Mon Oct 06 03:15:01 2014 +0000
- Parent:
- 20:660361de9b8c
- Child:
- 22:17da4f0985dc
- Child:
- 23:dcc1ade67468
- Commit message:
- updates for DF
Changed in this revision
| StatusReporter.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/StatusReporter.cpp Fri Sep 26 04:38:23 2014 +0000
+++ b/StatusReporter.cpp Mon Oct 06 03:15:01 2014 +0000
@@ -23,8 +23,12 @@
// Logging
#define LOG_CONSOLE(...) { if (this->logger() != NULL) { this->logger()->logConsole(__VA_ARGS__); } }
- // temperature sensor
- AnalogIn tmp36_temp_sensor(TEMP_PIN);
+ // ****************** DreamForce 2014 ******************//
+
+ // Temperature sensor - The TMP36 sensor uses A3 in the shield.. See Definitions.h for the define.
+ // AnalogIn tmp36_temp_sensor(TEMP_PIN);
+
+ // ****************** DreamForce 2014 ******************//
StatusReporter::StatusReporter(HTTPClient *http,Logger *logger) : m_case_generator(http,logger), m_db(), m_rfid_reader(RFID_TX_PIN,RFID_RX_PIN) {
this->m_logger = logger;
@@ -37,8 +41,15 @@
// Calculate the ambient temperature of the TMP36 sensor in C...
int StatusReporter::getLocalTemperature() {
- //conversion to degrees C - from sensor output voltage per TMP36 data sheet
- float tempC = (float)(((float)tmp36_temp_sensor*3.3)-0.600)*100.0;
+ // Temperature sensor output voltage per TMP36 data sheet
+ //
+ // Celcius temperature is calulated as follows:
+ // tempC = ((temperature_sensor_voltage*3.3) - 0.6) * 100.0;
+ //
+ // Example: float tempC = (float)(((float)tmp36_temp_sensor*3.3)-0.600)*100.0;
+ //
+
+ float tempC = 0.0;
// DEBUG
LOG_CONSOLE("Ambient Temp: %.1f C",tempC);