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: mbed mbedConnectorInterface mbedEndpointNetwork
Diff: main.cpp
- Revision:
- 1:6178b6411293
- Parent:
- 0:6af0e7b187d9
- Child:
- 2:6eb88bd81529
--- a/main.cpp Mon Apr 27 19:25:18 2015 +0000 +++ b/main.cpp Mon Apr 27 19:59:03 2015 +0000 @@ -53,16 +53,20 @@ // // Light Resource -#include "LightResource.h" -LightResource light(&logger,"3311/0/5706"); +//#include "LightResource.h" +//LightResource light(&logger,"3311/0/5706"); // LED Resource #include "OnBoardLED.h" LEDResource led(&logger,"3311/1/5706"); // SLide control Resource -#include "SliderResource.h" -SliderResource slider(&logger,"3202/0/5600", true); /* true if observable */ +//#include "SliderResource.h" +//SliderResource slider(&logger,"3202/0/5600", true); /* true if observable */ + +// Moisture Resource +#include "MoistureResource.h" +MoistureResource moisture(&logger, "3304/0/5600", true); /* true for observable */ // Set our own unique endpoint name #define MY_ENDPOINT_NAME "WateringBoard" @@ -80,7 +84,8 @@ { // Build the endpoint configuration parameters logger.log("configure_endpoint: building endpoint configuration..."); - slider.setMaxAge(0); /* MaxAge = 0 to disable caching of the slide value in the Device Server */ + //slider.setMaxAge(0); /* MaxAge = 0 to disable caching of the slide value in the Device Server */ + moisture.setMaxAge(0); return config.setEndpointNodename(MY_ENDPOINT_NAME) // custom endpoint name .setNSPAddress(my_nsp_address) // custom NSP address .setDomain(MY_NSP_DOMAIN) // custom NSP domain @@ -91,9 +96,10 @@ .addResource(&model) // Add my specific physical dynamic resources... - .addResource(&light) - .addResource(&slider, 10000) + //.addResource(&light) + //.addResource(&slider, 10000) .addResource(&led) + .addResource(&moisture, 10000) // finalize the configuration... .build();