Proof of concept for distance and temperature monitoring
Dependencies: mbed mbedConnectorInterface mbedEndpointNetwork
Revision 9:16b63cd4aba8, committed 2015-05-07
- Comitter:
- coyotebush
- Date:
- Thu May 07 04:14:57 2015 +0000
- Parent:
- 8:c69fe28366d8
- Child:
- 10:338191178cbf
- Commit message:
- Add static location resource
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed May 06 04:02:08 2015 +0000 +++ b/main.cpp Thu May 07 04:14:57 2015 +0000 @@ -18,7 +18,6 @@ /* Sensors */ #define TRIG_PIN D6 #define ECHO_PIN D5 -#define FIRE_THRESH 32.0 HCSR04 distS(TRIG_PIN, ECHO_PIN); GroveTempSensor tempS; @@ -26,6 +25,9 @@ StaticResource mfg(&logger, "3/0/0", "Freescale"); StaticResource model(&logger, "3/0/1", "K64F mbed Ethernet demo"); +StaticResource latitude(&logger, "6/0/0", "35.296"); +StaticResource longitude(&logger, "6/0/1", "-120.677"); + DistanceResource distR(&logger, "3302/0/5600", &distS, true); TemperatureResource tempR(&logger, "3303/0/5700", &tempS, true); LEDResource led(&logger, "3311/1/5706"); @@ -39,6 +41,8 @@ distR.setMaxAge(15); return config.addResource(&mfg) .addResource(&model) + .addResource(&latitude) + .addResource(&longitude) .addResource(&distR) .addResource(&tempR) .addResource(&led)