RGB LED Adaptive Camouflage (chameleon) Using Ebot / Arduino

2,206

20

7

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.

Supplies:

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

{ //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.

Share

    Recommendations

    • Classroom Science Contest

      Classroom Science Contest
    • Arduino Contest 2019

      Arduino Contest 2019
    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest

    7 Discussions

    0
    None
    yasarmk

    1 year ago

    Nice one

    0
    None
    AnandK120

    1 year ago

    The world needs more people like you!

    MIT needs you.

    1 reply
    0
    None
    tomatoskins

    1 year ago

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

    1 reply
    0
    None
    AdnanM40tomatoskins

    Reply 1 year ago

    thank you for liking it

    and could you please vote for me in the LED contest

    0
    None
    AdnanM40Swansong

    Reply 1 year ago

    thank you ...and please vote for me