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 mbed
You are viewing an older revision! See the latest version
Homepage
Capsule Calibrator¶
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:
/************************
* Modify parameters below
************************/
#define COLOR_SENSOR_SCL I2C_SCL
#define COLOR_SENSOR_SDA I2C_SDA
#define NUM_RUNS_PER_CAPSULE 20
#define NUM_CAPSULES 5
const char* capsules[] = {
"decaffeinato_intenso",
"vivalto_lungo",
"roma",
"livanto",
"arpeggio"
};
/************************
* Stop editing here
************************/
Edit COLOR_SENSOR_SCL and COLOR_SENSOR_SDA to the appropriate I2C pins on your mbed platform.
Edit NUM_RUNS_PER_CAPSULE to change the number of repetitions needed per capsule. In general, this should be left at the default to ensure consistent detection.
Edit NUM_CAPSULES to match the number of different types of capsules you wish to detect.
Edit capsules to change the types of capsules that you wish to calibrate.