Proof of concept for distance and temperature monitoring
Dependencies: mbed mbedConnectorInterface mbedEndpointNetwork
resource/TemperatureResource.cpp@6:bbea44df21e8, 2015-05-05 (annotated)
- Committer:
- coyotebush
- Date:
- Tue May 05 05:18:03 2015 +0000
- Revision:
- 6:bbea44df21e8
Add TemperatureResource
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 | } |