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: EthernetInterface mbed-rtos mbed nsdl rgb_sensor_buffer
Fork of mbed_nsdl by
Diff: resources/nespresso.cpp
- Revision:
- 6:8729a0db0e25
- Parent:
- 4:ab3c8d25260e
diff -r cb0df4fbe7a1 -r 8729a0db0e25 resources/nespresso.cpp
--- a/resources/nespresso.cpp Mon Jul 14 12:34:16 2014 +0000
+++ b/resources/nespresso.cpp Fri Jul 18 10:47:23 2014 +0000
@@ -1,5 +1,3 @@
-// GPS resource implementation
-
#include "mbed.h"
#include "rtos.h"
#include "nsdl_support.h"
@@ -16,57 +14,7 @@
static const char* g_name = "no_capsule";
-static RGB_Detection g_detector(p23,p24,p25,p20);
-
-
-/*
- *
- *
- */
-/*
-const char* do_detection()
-{
- static int counter = 0;
-
- const char *names[] = {
- "KAZAAR",
- "DHARKAN",
- "RISTRETTO",
- "ARPEGGIO",
- "ROMA",
- "LIVANTO",
- "CAPRICCIO",
- "VOLLUTO",
- "COSI",
- "INDRIYA FROM INDIA",
- "ROSABAYA DE COLUMBIA",
- "DULSAO DO BRASIL",
- "BUKEELA KA ETHIOPIA",
- "FORTISSIMO LUNGO RENOVATION",
- "DECAFFEINATO LUNGO",
- "DECAFFEINATO",
- "DECAFFEINATO INTENSO"
- };
- const int num_names = sizeof(names) / sizeof(names[0]);
-
- wait_ms(1500);
-
- counter++;
- return names[counter % num_names];
-}
-*/
-/*
- console.printf("Started\r\n");
- RGB_Detection detector(p23,p24,p25,p20);
-
- console.baud(115200);
-
- while (1)
- {
- const char* name = detector.run();
- console.printf("%s\r\n", name);
- }
-*/
+//static RGB_Detection g_detector(p23,p24,p25,p20);
/* Thread for calling libNsdl exec function (cleanup, resendings etc..) */
/* Node updates nespresso value every 10 seconds. Notification sending is done here. */
@@ -83,7 +31,7 @@
{
obs_number++;
pc.printf("Waiting for detector...\r\n");
- g_name = g_detector.run(); //do_detection();
+ g_name = ""; // g_detector.run();
int len = strlen(g_name);
pc.printf("Detected %s\r\n", g_name);
if(sn_nsdl_send_observation_notification(obs_token_ptr, obs_token_len, (uint8_t*)g_name, len, &obs_number, 1, COAP_MSG_TYPE_NON_CONFIRMABLE, 0) == 0)
