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: ColorDetectorV2 EthernetInterface mbed-rtos mbed nsdl
Fork of nespresso_endpoint by
You are viewing an older revision! See the latest version
Homepage
mbed Software Configuration¶
The default mbed Device Server (NSP or mDS) configuration is used by an instance of the web app (Barista) here: http://barista-test.cloudapp.net:4005.
In main.cpp, find the following lines:
// ****************************************************************************
// Configuration section
// I2C Settings
#define COLOR_SENSOR_SCL I2C_SCL
#define COLOR_SENSOR_SDA I2C_SDA
// Ethernet configuration
/* Define this to enable DHCP, otherwise manual address configuration is used */
#define DHCP
/* Manual IP configurations, if DHCP not defined */
#define IP "0.0.0.0"
#define MASK "255.255.255.0"
#define GW "0.0.0.0"
// NSP configuration
/* Change this IP address to that of your mbed Device Server installation if you're not using mbed Connector */
static const char* NSP_ADDRESS = "api.connector.mbed.org";
static const int NSP_PORT = 5683;
char endpoint_name[] = "nespresso-machine-ethernet";
uint8_t ep_type[] = {"nespresso-endpoint"};
char nsp_domain[] = "56645321f5e24c49908e42f4d71b9ccb";
uint8_t lifetime_ptr[] = {"1200"};
// ****************************************************************************
Customize the I2C pins if they are not compatible with your mbed platform.
You should not edit the DHCP/static IP settings if you are not using a static IP address. If you are using a static IP address, provide the appropriate information and remove the following line:
#define DHCP
Change endpoint_name to uniquely identify your Nespresso endpoint.
If you are using mbed Connector, change the nsp_domain string to your domain.
If you are using your own installation of mDS, you should change NSP_ADDRESS to the url of your mDS installation, NSP_PORT if you're using a non default port on mDS for CoAP, and nsp_domain to a valid domain on your mDS instance ("domain" is the default mDS domain).
