Mundarija:

RGB LED moslashuvchan kamuflyaji (xameleyon) Ebot / Arduino yordamida: 5 qadam (rasmlar bilan)
RGB LED moslashuvchan kamuflyaji (xameleyon) Ebot / Arduino yordamida: 5 qadam (rasmlar bilan)

Video: RGB LED moslashuvchan kamuflyaji (xameleyon) Ebot / Arduino yordamida: 5 qadam (rasmlar bilan)

Video: RGB LED moslashuvchan kamuflyaji (xameleyon) Ebot / Arduino yordamida: 5 qadam (rasmlar bilan)
Video: LED neon flex strips 2024, Noyabr
Anonim
Ebot / Arduino yordamida RGB LED moslashuvchan kamuflyaji (xameleyon)
Ebot / Arduino yordamida RGB LED moslashuvchan kamuflyaji (xameleyon)
Ebot / Arduino yordamida RGB LED moslashuvchan kamuflyaji (xameleyon)
Ebot / Arduino yordamida RGB LED moslashuvchan kamuflyaji (xameleyon)
RGB LED moslashuvchan kamuflyaji (xameleyon) Ebot / Arduino yordamida
RGB LED moslashuvchan kamuflyaji (xameleyon) Ebot / Arduino yordamida
Ebot / Arduino yordamida RGB LED moslashuvchan kamuflyaji (xameleyon)
Ebot / Arduino yordamida RGB LED moslashuvchan kamuflyaji (xameleyon)

Bu haqiqatan ham ajoyib va sodda loyiha. Fon rangini sezish uchun rang sensori ishlatiladi va uni RGB LED tasmasida ko'rsatadi.

Men Ebot mikrokontrolleridan foydalandim, lekin siz arduino uno kabi boshqa mikrokontrolderlardan ham foydalanishingiz mumkin.

1 -qadam: materiallarni yig'ish

Materiallarni yig'ish
Materiallarni yig'ish

Elektron komponentlar:-

1 x Ebot mikrokontroller (siz arduino yoki boshqa mikrokontrollerdan ham foydalanishingiz mumkin)

1 x Rang sensori

1 x RGB LED tasmasi

6 x o'tish simlari

Sinov uchun siz turli xil rangli varaqlarni olishingiz mumkin.

2 -qadam: sozlash

Sozlash
Sozlash

Haqiqatan ham sozlash juda oson

1. RGB LED -ni oling va GND, Do va +5v -dagi uchta o'tish simini lehimlang va ularni mos ravishda GND piniga, 0 pinli va 5v pinli mikrokontrolderga ulang.

2. Keyin rang sensori bilan

GND GND mikrokontroldagi pin

mikrokontroldagi kuchlanish pimi kuchlanish pimi

s A0 pin mikrokontrollerda

3 -qadam: yig'ish

O'rnatish
O'rnatish
O'rnatish
O'rnatish

O'rnatish tugagandan so'ng, rang sensori chiziqni pastga qarating.

4 -qadam: kod

Kod
Kod

{// Boshlanishlar ebot_setup ();

// Pin rejimi

strip0.begin ();

strip0.show ();

pinMod (0, OUTPUT); // RGB LED

pinMode (A0, INPUT); // Rang sensori

}

bo'sh halqa ()

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

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

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

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

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

}

Sensorga ko'proq rang berishini bildirish uchun siz ko'proq va ko'proq qo'shishingiz mumkin.

5 -qadam: video

Image
Image

Nihoyat, videoda ko'rsatilgandek, uning ishlashini tekshirish uchun siz turli xil rangli qog'ozlarni qo'shishingiz mumkin.

Tavsiya: