Things used in this project

Hardware components:
09716 01
SparkFun FTDI Basic Breakout - 5V
×1
SparkFun DC Barrel Jack Adapter - Breadboard Compatible
×1
12002 04
Breadboard (generic)
×1
SparkFun Wall Adapter Power Supply - 12VDC 600mA
×1
SparkFun Heatsink TO-220
×1
SparkFun Capacitor Ceramic 0.1uF
×1
Male/Male Jumper Wires
×1
12009 06
SparkFun Logic Level Converter - Bi-Directional
×1
SparkFun Voltage Regulator - 3.3V
×1
11113 01
SparkFun Arduino Pro Mini 328 - 5V/16MHz
×1
SparkFun Serial Enabled 16x2 LCD - White on Black 5V
×1
826 04
Male/Female Jumper Wires
×1
SparkFun USB Mini-B Cable - 6 Foot
×1
SparkFun RGB Light Sensor - ISL29125
×1
Panasonic eca1hm2r2
Capacitor 10 µF
×1
Software apps and online services:
https://circuito.io/
https://www.circuito.io/app?selectedComponentsIds=11113&selectedComponentsIds=12829&selectedComponentsIds=9395&selectedComponentsIds=9442
Hand tools and fabrication machines:
3drag
3D Printer (generic)

Custom parts and enclosures

capsule detectur lid
capsule detector

Schematics

schematics
diagram_(2)_kdbflFMitv.fzz

Code

basic codeC/C++
No preview (download only).
Calibrate the capsule readerC/C++
Once you upload the code, you'll need to calibrate the reader.

1. Uncomment these line in the code by removing the /* and */ before and after the lines:

/*
Serial.print("Red:");
Serial.print(rgbSensor.readRed());
Serial.print("Green:");
Serial.print(rgbSensor.readGreen());
Serial.print("Blue:");
Serial.print(rgbSensor.readBlue());
Serial.println();
delay(500);
*/
2. Upload the sketch to the Arduino
3. Open the Arduino IDE serial monitor and insert a capsule

4. Write down the RGB values that appear on your serial monitor

5. Type the 3 values under the correct capsule name in the capsule array code:
int cosi[3] = {229, 389, 329};
int dulsao[3] = {142, 253, 191};
int roma[3] = {83, 196, 177};
int livanto[3] = {188, 299, 187};
int vivalto_lungo [3] = {134, 294, 449};
int bukeela_lungo[3] = {330, 452, 319};
int kazaar[3] = {60, 165, 180};
int volluto[3] = {263, 421, 248};
 
 /*
    Serial.print("Red:");
    Serial.print(rgbSensor.readRed());
    Serial.print("Green:");
    Serial.print(rgbSensor.readGreen());
    Serial.print("Blue:");
    Serial.print(rgbSensor.readBlue());
    Serial.println();
    delay(500);
*/  
 int cosi[3] = {229, 389, 329};
  int dulsao[3] = {142, 253, 191};
  int roma[3] = {83, 196, 177};
  int livanto[3] = {188, 299, 187};
  int vivalto_lungo [3] = {134, 294, 449};
  int bukeela_lungo[3] = {330, 452, 319};
  int kazaar[3] = {60, 165, 180};
  int volluto[3] = {263, 421, 248};
capsule dataC/C++
Once you’ve calibrated all the different capsules, you’re ready to go.

You can also add other capsules to the list. For this, you’ll need the create a new capsule data array:
    //new_capsule_name

    if (abs(red - new_capsule_name[0]) < thresh && abs(green - new_capsule_name[1]) < thresh && abs(blue - new_capsule_name[2]) < thresh ) {

    Serial.println("new_capsule_name");
      serlcd.setBrightness(28);
      serlcd.clear();
      serlcd.selectLine(1);
      serlcd.print("new_capsule_name");
      serlcd.selectLine(2);
      serlcd.print("Intensity: 10/10");
      delay(2500);
      serlcd.clear();
      serlcd.selectLine(1);
      serlcd.print("Cup Size:ml");
      serlcd.selectLine(2);
      serlcd.print("flavor");
      delay(2500);
      serlcd.clear();
}

Credits

Jzbvk4go5lw68vtvbfe4
circuito.io team

Circuito.io is an online platform that generates wiring and code for Arduino projects. Want to know more? Visit http://circuito.io

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Voice-Controlled Locking Device
Advanced
  • 596
  • 7

Full instructions

A voice-controlled project using the EasyVR Shield with an Arduino Uno and gen4-uLCD-43DT.

J.A.R.V.I.S. : A Virtual Home Assistant
Advanced
  • 4,387
  • 76

Full instructions

J.A.R.V.I.S. is a personal home automation assistant for controlling electrical home appliances integrated with an augmented reality app.

Inexpensive Wireless Interactive Board
Advanced
  • 9,140
  • 14

Full instructions

This is a low cost, modular smart board with wireless capabilities.

PrankChair THE BEST ARRIL FOOLS PRANK!
Advanced
  • 205
  • 3

Full instructions

PrankChair is a chair which looks normal but is too abnormal! ;)

DIY Code Red Button for Healthcare Simulation
Advanced
  • 561
  • 2

Full instructions

Create your own Code Red button for use in simulation scenarios. Flashing LEDs and Button!

Biomed Shield for Arduino 101 Powered By Intel
Advanced
  • 5,087
  • 16

Work in progress

Allows students, educators, and hobbyists to learn about biomedicine by monitoring heart rate, temperature, and other physiological metrics.

ProjectsCommunitiesContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login
Respect project
Feedback