Cov txheej txheem:

RGB LED Adaptive Camouflage (chameleon) Siv Ebot / Arduino: 5 Kauj Ruam (nrog Duab)
RGB LED Adaptive Camouflage (chameleon) Siv Ebot / Arduino: 5 Kauj Ruam (nrog Duab)

Video: RGB LED Adaptive Camouflage (chameleon) Siv Ebot / Arduino: 5 Kauj Ruam (nrog Duab)

Video: RGB LED Adaptive Camouflage (chameleon) Siv Ebot / Arduino: 5 Kauj Ruam (nrog Duab)
Video: CAMELEON - adaptive camouflage 2024, Hlis ntuj nqeg
Anonim
RGB LED Adaptive Camouflage (chameleon) Siv Ebot / Arduino
RGB LED Adaptive Camouflage (chameleon) Siv Ebot / Arduino
RGB LED Adaptive Camouflage (chameleon) Siv Ebot / Arduino
RGB LED Adaptive Camouflage (chameleon) Siv Ebot / Arduino
RGB LED Adaptive Camouflage (chameleon) Siv Ebot / Arduino
RGB LED Adaptive Camouflage (chameleon) Siv Ebot / Arduino
RGB LED Adaptive Camouflage (chameleon) Siv Ebot / Arduino
RGB LED Adaptive Camouflage (chameleon) Siv Ebot / Arduino

Qhov no yog qhov haujlwm zoo tiag tiag thiab yooj yim. Nws siv lub ntsuas xim kom paub xim ntawm keeb kwm yav dhau thiab qhia nws ntawm RGB LED sawb.

Kuv siv Ebot Microcontroller tab sis koj kuj tseem tuaj yeem siv lwm yam microcontroller xws li arduino uno.

Kauj Ruam 1: Sib Sau Cov Khoom

Sib Sau Cov Khoom
Sib Sau Cov Khoom

Cov khoom siv hluav taws xob:-

1 x Ebot Microcontroller (koj tseem tuaj yeem siv arduino lossis lwm yam microcontroller)

1 x Xim sensor

1 x RGB LED Sawb

6 x Jumper xov hlau

Rau kev sim koj tuaj yeem tau txais qee cov ntawv sib txawv xim.

Kauj ruam 2: Teeb

Teeb
Teeb

Kev teeb tsa yog yooj yim heev

1. coj lub RGB LED thiab txuas peb lub xov hlau txuas rau ntawm GND, Ua, thiab +5v thiab txuas lawv rau GND tus pin, tso tawm 0 tus pin, thiab 5v tus pin feem ntawm lub microcontroller.

2. Tom ntej no nrog cov xim xim txuas lub

GND GND tus pin ntawm lub microcontroller

voltage pin voltage pin ntawm lub microcontroller

s A0 tus pin ntawm lub microcontroller

Kauj ruam 3: Sib dhos

Los ua ke
Los ua ke
Los ua ke
Los ua ke

Tom qab koj ua tiav nrog teeb tsa xa cov xim xim mus rau kab txaij tig mus.

Kauj ruam 4: Code

Code
Code

{// Initialisations ebot_setup ();

// Tus Qauv Pin

strip0.begin ();

strip0.show ();

pinMode (0, NTAWV); // RGB coj

pinMode (A0, INPUT); // Xim Sensor

}

void lub voj ()

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

} lwm yog (xim (A0)> = 79 && xim (A0) <= 149) {colorWipe (& strip0, 0, 105, 14, 25);

} lwm yog (xim (A0)> = 21 && xim (A0) <= 43) {colorWipe (& strip0, 255, 221, 0, 25);

} lwm yog (xim (A0)> = 340 && xim (A0) <= 352) {colorWipe (& strip0, 191, 3, 0, 25);

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

}

koj tuaj yeem ntxiv ntau thiab ntau ntxiv yog cov lus hais kom ua rau lub ntsej muag paub ntau xim.

Kauj ruam 5: Yees duab

Image
Image

Thaum kawg raws li qhia hauv video koj tuaj yeem ntxiv cov ntawv xim sib txawv los ntsuas seb nws ua haujlwm li cas.

Pom zoo: