Nespresso coffee demo working on the Arch Pro

Dependencies:   EthernetInterface mbed-rtos mbed nsdl rgb_sensor_buffer

Fork of mbed_nsdl by Nespresso RGB Sensor

Revision:
6:8729a0db0e25
Parent:
4:ab3c8d25260e
Child:
8:27e94f52810b
--- a/main.cpp	Mon Jul 14 12:34:16 2014 +0000
+++ b/main.cpp	Fri Jul 18 10:47:23 2014 +0000
@@ -3,6 +3,7 @@
 #include "nsdl_support.h"
 #include "dbg.h"
 #include "nespresso.h"
+#include "buffered_rgb_resource.h"
 
 Serial pc(USBTX, USBRX); // tx, rx
 
@@ -20,7 +21,7 @@
 
 // NSP configuration
 /* Change this IP address to that of your NanoService Platform installation */
-static const char* NSP_ADDRESS = "10.1.16.228"; // "23.97.218.184"; /* demo NSP, web interface at http://nanoservice-demo.mbed.org*/ 
+static const char* NSP_ADDRESS = "23.99.96.113";
 static const int NSP_PORT = 5683;
 char endpoint_name[] = "nespresso-client";
 uint8_t ep_type[] = {"mbed_device"};
@@ -89,7 +90,8 @@
     }
     memset(resource_ptr->resource_parameters_ptr, 0, sizeof(sn_nsdl_resource_parameters_s));
 
-    create_nespresso_resource(resource_ptr);
+    //create_nespresso_resource(resource_ptr);
+    create_buffered_rgb_resource(resource_ptr);
 
     /* Register with NSP */
     endpoint_ptr = nsdl_init_register_endpoint(endpoint_ptr, (uint8_t*)endpoint_name, ep_type, lifetime_ptr);
@@ -109,6 +111,8 @@
 
 int main()
 {
+    pc.baud(115200);
+
     // Initialize Ethernet interface first
     pc.printf("Initializing ethernet... ");
     ethernet_init();