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

Files at this revision

API Documentation at this revision

Comitter:
bridadan
Date:
Fri Mar 20 16:11:15 2015 +0000
Parent:
8:27e94f52810b
Commit message:
Working on Arch Pro

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
nsdl_support.cpp Show annotated file Show diff for this revision Revisions of this file
resources/buffered_rgb_resource.cpp Show annotated file Show diff for this revision Revisions of this file
rgb_sensor_buffer.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 27e94f52810b -r ad05fe84b4ff main.cpp
--- a/main.cpp	Mon Sep 15 14:14:44 2014 +0000
+++ b/main.cpp	Fri Mar 20 16:11:15 2015 +0000
@@ -20,7 +20,7 @@
 
 // NSP configuration
 /* Change this IP address to that of your NanoService Platform installation */
-static const char* NSP_ADDRESS = "23.99.96.113";
+static const char* NSP_ADDRESS = "barista-mds.cloudapp.net";
 static const int NSP_PORT = 5683;
 char endpoint_name[] = "nespresso-client";
 uint8_t ep_type[] = {"mbed_device"};
@@ -108,6 +108,15 @@
 // ****************************************************************************
 // Program entry point
 
+extern "C" void mbed_mac_address(char *mac){
+    mac[0] = 0x00;
+    mac[1] = 0x02;
+    mac[2] = 0xF7;
+    mac[3] = 0xF1;
+    mac[4] = 0x91;
+    mac[5] = 0x9F;
+};
+
 int main()
 {
     pc.baud(115200);
diff -r 27e94f52810b -r ad05fe84b4ff nsdl_support.cpp
--- a/nsdl_support.cpp	Mon Sep 15 14:14:44 2014 +0000
+++ b/nsdl_support.cpp	Fri Mar 20 16:11:15 2015 +0000
@@ -70,8 +70,8 @@
         memset(endpoint_structure, 0, sizeof(sn_nsdl_ep_parameters_s));
         endpoint_structure->endpoint_name_ptr = name;
         endpoint_structure->endpoint_name_len = strlen((char*)name);            
-//        endpoint_structure->domain_name_ptr = (uint8_t*) "Robert\0";
-//        endpoint_structure->domain_name_len = strlen((char*) "Robert\0");
+        endpoint_structure->domain_name_ptr = (uint8_t*) "domain\0";
+        endpoint_structure->domain_name_len = strlen((char*) "domain\0");
         endpoint_structure->type_ptr = typename_ptr;
         endpoint_structure->type_len =  strlen((char*)typename_ptr);
         endpoint_structure->lifetime_ptr = lifetime_ptr;
diff -r 27e94f52810b -r ad05fe84b4ff resources/buffered_rgb_resource.cpp
--- a/resources/buffered_rgb_resource.cpp	Mon Sep 15 14:14:44 2014 +0000
+++ b/resources/buffered_rgb_resource.cpp	Fri Mar 20 16:11:15 2015 +0000
@@ -7,7 +7,7 @@
 
 #define RESOURCE_ID    "sensor/capsule"
 #define RGB_VALUES 512
-#define RGB_THRESHOLD 115
+#define RGB_THRESHOLD 50
 
 extern Serial pc;
 /* stored data for observable resource */
@@ -16,7 +16,8 @@
 static uint8_t obs_token_len = 0;
 
 static TRGB g_buffer[RGB_VALUES];
-static RGB_SensorBuffer g_rgb(p23,p24,p25,p20);
+//static RGB_SensorBuffer g_rgb(p23,p24,p25,p20);
+static RGB_SensorBuffer g_rgb(P2_3,P2_2,P2_4,P1_31);
 static Payload g_payload;
 
 static void exec_call_thread(void const *args)
diff -r 27e94f52810b -r ad05fe84b4ff rgb_sensor_buffer.lib
--- a/rgb_sensor_buffer.lib	Mon Sep 15 14:14:44 2014 +0000
+++ b/rgb_sensor_buffer.lib	Fri Mar 20 16:11:15 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/meriac/code/rgb_sensor_buffer/#8fbb1cd0c2d9
+http://developer.mbed.org/users/bridadan/code/rgb_sensor_buffer/#363d6de01d73