endpoint including temperature and distance sensors
Dependencies: mbed mbedConnectorInterface mbedEndpointNetwork TrashSensors
Fork of TempAndDistTest by
resource/TemperatureResource.cpp@11:ac0ff76a6deb, 2015-05-25 (annotated)
- Committer:
- coyotebush
- Date:
- Mon May 25 03:21:11 2015 +0000
- Revision:
- 11:ac0ff76a6deb
- Parent:
- 6:bbea44df21e8
Move sensor code into library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
coyotebush | 6:bbea44df21e8 | 1 | #include "TemperatureResource.h" |
coyotebush | 6:bbea44df21e8 | 2 | |
coyotebush | 6:bbea44df21e8 | 3 | string TemperatureResource::get() { |
coyotebush | 6:bbea44df21e8 | 4 | char buf[10]; |
coyotebush | 6:bbea44df21e8 | 5 | snprintf(buf, 10, "%0.2f", sensor->getTemp()); |
coyotebush | 6:bbea44df21e8 | 6 | return string(buf); |
coyotebush | 6:bbea44df21e8 | 7 | } |