RGB LED Adaptive Camouflage (chameleon) Using Ebot / Arduino

1,882

19

10

Posted

Introduction: RGB LED Adaptive Camouflage (chameleon) Using Ebot / Arduino

THIS INSTRUCTABLE IS BEING SHOWCASED IN "ARDUINO CONTEST" AND "LED CONTEST" IF YOU LIKE IT, VOTE FOR IT!

This is a really great and simple project. It uses a color sensor to sense the color of the background and displays it on the RGB LED strip.

I used an Ebot Microcontroller but you could also use any other microcontroller such as arduino uno.

Step 1: Assemble Materials

Electronic components:-

1 x Ebot Microcontroller ( you can also use arduino or any other microcontroller )

1 x Color sensor

1 x RGB LED Strip

6 x Jumper wires

For testing you could get some different colored sheets.

Step 2: Setup

The setup is really easy

1. take the RGB LED and solder three jumper wires on GND, Do, and +5v and connect them to GND pin, output 0 pin, and 5v pin respectively on the microcontroller.

2. Next with the color sensor connect the the

GND --> GND pin on the microcontroller

voltage pin--> voltage pin on the microcontroller

s --> A0 pin on the microcontroller

Step 3: Assembly

After you are done with the setup attach the color sensor to the strip facing down.

Step 4: Code

void setup()

{ //Initialisations ebot_setup();

//Pin Modes

strip0.begin();

strip0.show();

pinMode(0, OUTPUT); //RGB LED

pinMode(A0, INPUT); //Color Sensor

}

void loop()

{ if(colour(A0)>=182 && colour(A0)<= 279) { colorWipe(&strip0,0,45,97,25);

} else if(colour(A0)>=79 && colour(A0)<= 149) { colorWipe(&strip0,0,105,14,25);

} else if(colour(A0)>=21 && colour(A0)<= 43) { colorWipe(&strip0,255,221,0,25);

} else if(colour(A0)>=340 && colour(A0)<= 352) { colorWipe(&strip0,191,3,0,25);

} else { colorWipe(&strip0,0,0,0,25); }

}

you could add more and more if statements to make the sensor sense more colors.

Step 5: Video

Finally as shown in the video you could add different color papers to test how it works.

PLEASE VOTE!

Share

    Recommendations

    • Space Challenge

      Space Challenge
    • Science of Cooking

      Science of Cooking
    • Pocket-Sized Contest

      Pocket-Sized Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    7 Comments

    The world needs more people like you!

    MIT needs you.

    This is great! I've never heard of a color sensor before. Thanks for sharing.

    thank you for liking it

    and could you please vote for me in the LED contest

    That's looks really cool :) Neat setup!

    thank you ...and please vote for me