TrailTraffic

Dependencies:   Chainable_RGB_LED mbed mbedConnectorInterface mbedEndpointNetwork

Fork of IoT_LED_demo by MBED_DEMOS

Revision:
1:b96a11b680dc
Parent:
0:a7458d25d9c9
--- a/main.cpp	Thu Apr 16 13:56:23 2015 +0000
+++ b/main.cpp	Fri May 22 00:39:20 2015 +0000
@@ -19,7 +19,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 // mbed Connector Interface (configuration)
 #include "mbedConnectorInterface.h"
 
@@ -64,15 +63,27 @@
 #include "SliderResource.h"
 SliderResource slider(&logger,"3202/0/5600", true); /* true if observable */
 
+#include "UV.h"
+UVResource uv(&logger,"3311/2/5706");
+
+#include "Temp.h"
+TempResource temp(&logger, "3311/3/5706");
+
+#include "Motion.h"
+MotionResource motion(&logger, "3311/4/5706");
+
+#include "mbed.h"
+
+
 // Set our own unique endpoint name
-#define MY_ENDPOINT_NAME                       "Changeme-LED-demo"
+#define MY_ENDPOINT_NAME                       "TrailTraffic"
 
 // My NSP Domain
-#define MY_NSP_DOMAIN                          "domain2"                               
+#define MY_NSP_DOMAIN                          "trail"                               
 
 // Customization Example: My custom NSP IPv4 or IPv6 address and NSP CoAP port 
 //uint8_t my_nsp_address[NSP_IP_ADDRESS_LENGTH] = {192,168,1,199}; /* local */
-uint8_t my_nsp_address[NSP_IP_ADDRESS_LENGTH] = {108,201,184,41}; /* smartobjectservice.com */
+uint8_t my_nsp_address[NSP_IP_ADDRESS_LENGTH] = {54,191,98,247}; /* smartobjectservice.com */
 int my_nsp_coap_port                          = 5683;
 
 // called from the Endpoint::start() below to create resources and the endpoint internals...
@@ -94,11 +105,14 @@
                  .addResource(&light)
                  .addResource(&slider, 10000)
                  .addResource(&led)
-                   
+                 .addResource(&temp)
+                 .addResource(&uv)
+                 .addResource(&motion)
                  // finalize the configuration...
                  .build();
 }
 
+
 // main entry point...
 int main()
 {
@@ -110,5 +124,7 @@
      
     // starts the endpoint by finalizing its configuration (configure_endpoint() above called),creating a Thread and reading NSP events...
     logger.log("Start the endpoint to finish setup and enter the main loop...");
-    Connector::Endpoint::start();
+    Connector::Endpoint::start(); 
 }
+
+// jameco sensor motion pir 3-5VOC 120 19.5ft dist dist/hold time adj
\ No newline at end of file