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

Contact

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

Wildlife Detector
Advanced
  • 688
  • 13

Device detects motion, then takes a picture of triggering wildlife. Uses a neural net to identify the wildlife species and does something.

Make an Autonomous "Follow Me" Cooler
Advanced
  • 10,581
  • 81

Full instructions

We use an Arduino to build an autonomous "follow me" cooler that connects to a smartphone via Bluetooth and uses GPS to navigate.

Solar Power Module V2
Advanced
  • 1,676
  • 24

Full instructions

Single board to control solar charge and battery monitoring for your outdoor projects. Your project will see a perpetually charged battery.

MEGA BREAD - Hank the Hexabot
Advanced
  • 276
  • 4

Work in progress

A 6 legged, 18 servo, self guiding time wasting project. MEGA BREAD series #7, Delivery and retrieval from the air project.

Kalam32 ESP32 Board as a Wireless WiFi/TCP ECG/Resp Monitor
Advanced
  • 583
  • 12

Protip

We interface one of our most popular Arduino shields, the ADS1292R ECG/Respiration shield, to ProtoCentral's new ESP32 platform.

 Theft Detector
Advanced
  • 48
  • 1

Full instructions

This project will show you how to make a simple valuable things or gadget protector.

ProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login
Feedback