Introduction: Controlling an RGB LED With Color Detector Camera
This instructable shows how to control an RGB led using an arduino board and 1Sheeld.
The key feature being the colour is selected by detecting the color with your android phone camera, the RGB value is processed and sent to the audrino which then outputs that same value.
Feel free to ask any questions in the comments and I'll answer them as best i can.
Video below shows the final result:
Step 1: What You Need
Arduino Uno or Mega.
1 x RGB LED.
4 x Connection Wires.
1 x Breadboard.
3 x 220 Ohms Resistors.
Step 2: Wiring and Setup
1.mount the 1sheeld on the Arduino board
2.Make sure the power switch shown above is turned to 5V (for Arduino UNO users) if you're using another Arduino board check here
3.Connect the X3 220 ohms resistors as shown.
4.Connect the long leg of the RGB to the GND
then connect the Red Leg to pin9, Green Leg to pin10 and Blue Leg to pin11.
Step 3: Software
- Simply, the code reads the values of your phone's Camera then sends them to the RGB.
- Upload the attached code and lets move to the next step.
- Use your 1Sheeld Mobile App (Color Detector Shield) to scan any color you want.
PS: make sure the 1sheeld is in upload mode as seen in the image above.
Step 4: Putting It All Together
- After connecting all components as shown.
- Connect the Arduino to your laptop and make sure the code is uploaded.
- Switch the 1Sheeld back to operating mode.
- Open your 1Sheeld app and connect your phone to your 1Sheeld board. (Check 1Sheeld tutorial here if you haven't already).
- Select Color Detector Shield, and press on the multiple shields icon at the top right of the app.
- Now, hold your phone, then scan the color of any object and watch your RGB.
- Finally, feel free to ask any questions in the comments and I'll answer them as best i can.
We have a be nice policy.
Please be positive and constructive.