This project main target is to make your smartphone say the color of anything using just your smartphone and 1sheeld with Arduino.

this project uses the color sensor shield from 1sheeld app this shield uses the camera of your smartphone to get the color of the object In front of it as an RGB value and sends this value to the Arduino

then the Arduino compare between these values and the values of the colors when it finds a match it sends the name of the color to your smartphone then the phone say the color name using the Text to speech shield

This project will be very helpful for people who suffer from blindness or color blindness especially when they want to know the color of their clothes.

Step 1: About 1SHEELD and Arduino

Arduino is an open-source platform based on flexible, easy-to-use hardware and software. It is intended for anyone who has an idea for a project and wants to bring it to the real life. To make a project with Arduino you need to buy some accessories to connect your Arduino to the real world, these accessories are called shields. 1SHEELD is a shield that allows you to use your smartphone as an Arduino shield like GSM, WIFI, Gyroscope, etc.

The main advantage of 1SHEELD is that it replaces all other shields with just your smartphone and saves you a fortune. It connects the Arduino to your smartphone using the Bluetooth and it gives you the ability to use more than shield at a time like GSM, WIFI, Accelerometer, Gyroscope etc.

1sheeld - http://www.1sheeld.com/

Step2: Adjust 1Sheeld

If you use an Arduino that works with 3.3 V like Arduino due you must switch your 1Sheeld to operate on 3.3V since it may damage your board.

If you use an Arduino that works with 5 V like Arduino Uno then switch your 1Sheeld to operate on 5V.

Place your 1Sheeld on your Arduino board then plug the Arduino to your laptop or PC.

If you use an Arduino mega then connect your 1SHEELD to the mega as shown in the image

Step 3: download the 1sheeld application

For android smartphones, download the application here

For iOS, smartphones download the application from here

Step 4: download 1sheeld library to your computer

Download the liberty from here

Then, after you successfully downloaded the library, add the library .ZIP file to your Arduino program


Step 5: Write your code inside Arduino sketch

#define CUSTOM_SETTINGS
#define INCLUDE_COLOR_DETECTOR_SHIELD
#define INCLUDE_TEXT_TO_SPEECH_SHIELD
#define INCLUDE_PUSH_BUTTON_SHIELD

/* Include 1Sheeld library. */
#include 



void setup() {
  /* Start communication. */
  OneSheeld.begin();

  /* Set the color detection palette to get only 8 different colors instead of the default 16 million. */
  ColorDetector.setPalette(_3_BIT_RGB_PALETTE);



}

void loop() {
  /* Check if there's a new color received. */
  if( PushButton.isPressed())
  {
  if(ColorDetector.isNewColorReceived())
  {
    /* Read the last received color and save it locally. */
    Color readColor = ColorDetector.getLastColor();

    /* Get red, blue and green components values. */
    byte redValue = readColor.getRed();
    byte greenValue = readColor.getGreen();
    byte blueValue = readColor.getBlue();
    colorName(redValue,greenValue,blueValue);
   
    }
 delay(1000);
  }
}   
/* indentify the color using the values of red ,green,and blue and say the color name  */
void colorName(byte redvalue,byte greenvalue ,byte bluevalue)
{
      if (redvalue== 0 && greenvalue== 0 && bluevalue == 0)
         TextToSpeech.say("black");
     else if (redvalue== 0 && greenvalue== 0 && bluevalue == 85)
         TextToSpeech.say("nave");
     else if (redvalue== 0 && greenvalue== 0 && bluevalue == 170)
         TextToSpeech.say("dark blue");
     else if (redvalue== 0 && greenvalue== 0 && bluevalue == 255)
         TextToSpeech.say("blue");
     else if (redvalue== 0 && greenvalue== 85 && bluevalue == 0)
         TextToSpeech.say("dark green");
     else if (redvalue== 0 && greenvalue== 85 && bluevalue == 85)
         TextToSpeech.say("green");
     else if (redvalue== 0 && greenvalue== 85 && bluevalue == 170)
         TextToSpeech.say("blue");
     else if (redvalue== 0 && greenvalue== 85 && bluevalue == 255)
         TextToSpeech.say("blue");
     else if (redvalue== 0 && greenvalue== 170 && bluevalue == 0)
         TextToSpeech.say("green");
     else if (redvalue== 0 && greenvalue== 170 && bluevalue == 85)
         TextToSpeech.say("dark green");
     else if (redvalue== 0 && greenvalue== 170 && bluevalue == 170)
         TextToSpeech.say("sky blue");
     else if (redvalue== 0 && greenvalue== 170 && bluevalue == 255)
         TextToSpeech.say("light blue");
     else if (redvalue== 0 && greenvalue== 255 && bluevalue == 0)
         TextToSpeech.say("green");
     else if (redvalue== 0 && greenvalue== 255 && bluevalue == 85)
         TextToSpeech.say("spring green");
     else if (redvalue== 0 && greenvalue== 255 && bluevalue == 170)
         TextToSpeech.say("light green");
     else if (redvalue== 0 && greenvalue== 255 && bluevalue == 255)
         TextToSpeech.say("aqua");
     else if (redvalue== 85 && greenvalue== 0 && bluevalue == 0)
         TextToSpeech.say("dark red");
     else if (redvalue== 85 && greenvalue== 0 && bluevalue == 85)
         TextToSpeech.say("dark purple");
     else if (redvalue== 85 && greenvalue== 0 && bluevalue == 170)
         TextToSpeech.say("purple");
     else if (redvalue== 85 && greenvalue== 0 && bluevalue == 255)
         TextToSpeech.say("blue");
     else if (redvalue== 85 && greenvalue== 85 && bluevalue == 0)
         TextToSpeech.say("yellow");
     else if (redvalue== 85 && greenvalue== 85 && bluevalue == 85)
         TextToSpeech.say("gray");
     else if (redvalue== 85 && greenvalue== 85 && bluevalue == 170)
         TextToSpeech.say("blue");
     else if (redvalue== 85 && greenvalue== 85 && bluevalue == 255)
         TextToSpeech.say("light blue");
     else if (redvalue== 85 && greenvalue== 170 && bluevalue == 0)
         TextToSpeech.say("green");
     else if (redvalue== 85 && greenvalue== 170 && bluevalue == 85)
         TextToSpeech.say("lame green");
     else if (redvalue== 85 && greenvalue== 170 && bluevalue == 170)
         TextToSpeech.say("green");
     else if (redvalue== 85 && greenvalue== 170 && bluevalue == 255)
         TextToSpeech.say("light blue");
     else if (redvalue== 85 && greenvalue== 255 && bluevalue == 0)
         TextToSpeech.say("light green");
     else if (redvalue== 85 && greenvalue== 255 && bluevalue == 85)
         TextToSpeech.say("green");
     else if (redvalue== 85 && greenvalue== 255 && bluevalue == 170)
         TextToSpeech.say("blue green");
     else if (redvalue== 85 && greenvalue== 255 && bluevalue == 255)
         TextToSpeech.say("aqua");
     else if (redvalue== 170 && greenvalue== 0 && bluevalue == 0)
         TextToSpeech.say("red");
     else if (redvalue== 170 && greenvalue== 0 && bluevalue == 85)
         TextToSpeech.say("dark pink");
     else if (redvalue== 170 && greenvalue== 0 && bluevalue == 170)
         TextToSpeech.say("purple");
     else if (redvalue== 170 && greenvalue== 0 && bluevalue == 255)
         TextToSpeech.say("purple");
     else if (redvalue== 170 && greenvalue== 85 && bluevalue == 0)
         TextToSpeech.say("light brown");
     else if (redvalue== 170 && greenvalue== 85 && bluevalue == 85)
         TextToSpeech.say("pale pink");
     else if (redvalue== 170 && greenvalue== 85 && bluevalue == 170)
         TextToSpeech.say("purple");
     else if (redvalue== 170 && greenvalue== 85 && bluevalue == 255)
         TextToSpeech.say("meduim purple");
     else if (redvalue== 170 && greenvalue== 170 && bluevalue == 0)
         TextToSpeech.say("yellow");
     else if (redvalue== 170 && greenvalue== 170 && bluevalue == 85)
         TextToSpeech.say("pale green");
     else if (redvalue== 170 && greenvalue== 170 && bluevalue == 170)
         TextToSpeech.say("gray");
     else if (redvalue== 170 && greenvalue== 170 && bluevalue == 255)
         TextToSpeech.say("blue");
     else if (redvalue== 170 && greenvalue== 255 && bluevalue == 0)
         TextToSpeech.say("light green");
     else if (redvalue== 170 && greenvalue== 255 && bluevalue == 85)
         TextToSpeech.say("green");
     else if (redvalue== 170 && greenvalue== 255 && bluevalue == 170)
         TextToSpeech.say("green");
     else if (redvalue== 170 && greenvalue== 255 && bluevalue == 255)
         TextToSpeech.say("light blue");
     else if (redvalue== 255 && greenvalue== 0 && bluevalue == 0)
         TextToSpeech.say("red");
     else if (redvalue== 255 && greenvalue== 0 && bluevalue == 85)
         TextToSpeech.say("pink");
     else if (redvalue== 255 && greenvalue== 0 && bluevalue == 170)
         TextToSpeech.say("pink");
     else if (redvalue== 255 && greenvalue== 0 && bluevalue == 255)
         TextToSpeech.say("pink");
     else if (redvalue== 255 && greenvalue== 85 && bluevalue == 0)
         TextToSpeech.say("orange");
     else if (redvalue== 255 && greenvalue== 85 && bluevalue == 85)
         TextToSpeech.say("lame pink");
     else if (redvalue== 255 && greenvalue== 85 && bluevalue == 170)
         TextToSpeech.say("pink");
     else if (redvalue== 255 && greenvalue== 85 && bluevalue == 255)
         TextToSpeech.say("pink");
     else if (redvalue== 255 && greenvalue== 170 && bluevalue == 0)
         TextToSpeech.say("orange");
     else if (redvalue== 255 && greenvalue== 170 && bluevalue == 85)
         TextToSpeech.say("light orange");
     else if (redvalue== 255 && greenvalue== 170 && bluevalue == 170)
         TextToSpeech.say("pink");
     else if (redvalue== 255 && greenvalue== 170 && bluevalue == 255)
         TextToSpeech.say("pink");
     else if (redvalue== 255 && greenvalue== 255 && bluevalue == 0)
         TextToSpeech.say("yellow");
     else if (redvalue== 255 && greenvalue== 255 && bluevalue == 85)
         TextToSpeech.say("light yellow");
     else if (redvalue== 255 && greenvalue== 255 && bluevalue == 170)
         TextToSpeech.say("paje");
     else if (redvalue== 255 && greenvalue== 255 && bluevalue == 255)
         TextToSpeech.say("white");
                 
}
 


Step 6: compile and Upload your sketch to your Arduino board

Switch 1Sheeld to the Uploading-mode before you upload your sketch to the Arduino board to avoid serial conflicts between 1Sheeld and Arduino.

Upload mode is turned on when the UART switch is pushed away from the 1Sheeld logo.

And then press the Upload button in the IDE, and upload your code to Arduino.

after you completed your upload you need to switch 1Sheeld back to the operating mode

Step 7: connect 1sheeld to your smartphone using one shield application

You will be required to enter the pairing code (the default pairing code is 1234) and connect to 1Sheeld via Bluetooth.

Step 8: Access Shields

· color detector

· push button

· text to speech

press on the multiple shields icon at the top right of the app.

Step 9: configure color detector Shield

all images are from

1sheeld.com

thank