Cov txheej txheem:

DIY HAUV QHOV CHAW UA HAUJ LWM - Hloov Cov Teeb Pom Kev Li Qub: 5 Kauj Ruam
DIY HAUV QHOV CHAW UA HAUJ LWM - Hloov Cov Teeb Pom Kev Li Qub: 5 Kauj Ruam

Video: DIY HAUV QHOV CHAW UA HAUJ LWM - Hloov Cov Teeb Pom Kev Li Qub: 5 Kauj Ruam

Video: DIY HAUV QHOV CHAW UA HAUJ LWM - Hloov Cov Teeb Pom Kev Li Qub: 5 Kauj Ruam
Video: Yuav ua li cas qhov tsos thiaj dawb! DIY How to Lighten Dark Underarms! 2024, Kaum ib hlis
Anonim
DIY HAUV TSHUAJ TSEV KAWM NTAWV - Hloov Cov Teeb Pom Kev Zoo
DIY HAUV TSHUAJ TSEV KAWM NTAWV - Hloov Cov Teeb Pom Kev Zoo

Qhib lossis tua LIGHTS siv cov kov kov

Nta:

  • Capacitive touch sensors tau siv los qhib lub teeb es tsis siv cov khoom siv ib txwm siv.
  • PIR Sensors rau teeb pom kev zoo.

Kauj Ruam 1: Cov Ntaub Ntawv Xav Tau

Cov Ntaub Ntawv Xav Tau
Cov Ntaub Ntawv Xav Tau
Cov Ntaub Ntawv Xav Tau
Cov Ntaub Ntawv Xav Tau
Cov Ntaub Ntawv Xav Tau
Cov Ntaub Ntawv Xav Tau
Cov Ntaub Ntawv Xav Tau
Cov Ntaub Ntawv Xav Tau

1. ESP8266 ntaub thaiv npog- Cov khoom lag luam.com.com- A5-- ESP8266 serial WIFI qauv ESP-12 ESP-12E ESP12F Authenticity Guaranteed ESP12

2. Arduino UNO - AliExpress.com Khoom - UNO R3 Kev Txhim Kho Pawg ATmega328P CH340 CH340G Rau Arduino UNO R3 Nrog Ncaj Tus Pin Header 3. Arduino Mega - AliExpress.com Product - Mega 2560 R3 Board 4. Breadboard - Khoom.com.com - MB102 Breadboard 5. Jumper xov hlau - Cov khoom lag luam.com.com - Txiv neej + Poj niam rau Txiv neej thiab Poj Niam rau Poj Niam Jumper Hlau Dupont Cable rau arduino DIY KIT

Kauj Ruam 2: LIGHTS- Xaiv tus Pins rau Kov Sensors thiab Relays

Ntawm no 4 lub peev xwm kov lub ntsej muag tau siv. Txhua tus siv los qhib lossis tua lub teeb.

Nws ua haujlwm li cas? Thaum lub sensor tau nias nws qhib lub relay. Lub teeb txuas nrog rau lub relay yog tom qab ntawd qhib. Txhawm rau tua lub teeb lub sensor tau nias dua.

_

Pin 22 - Touchsensor1

Tus Pin 23 - Touchsensor2

Tus Pin 24 - Touchsensor3

Tus pin 25 - Touchsensor4

_

Tus Pin 26 - Tswv yim 1 ntawm kev xa tawm (Relay1)

Tus Pin 27 - Tswv yim 2 ntawm kev xa tawm (Relay2)

Tus Pin 28 - Cov tswv yim 3 ntawm kev xa tawm (Relay3)

Tus Pin 29 - Tswv yim 4 ntawm kev xa xov (Relay4)

_

Touchsensor1 qhib rau Relay1 thiab ntxiv rau…

Kauj Ruam 3: LIGHTS - Xaiv Pins rau PIR Sensors thiab Relay

Muaj ob lub teeb uas tau qhib los ntawm PIR sensors.

_

Pin 30 - PIR1

Pin 31 - PIR2

_

Tus Pin 32 - Tswv yim 5 ntawm kev xa tawm (Relay5)

Tus pin 33 - Cov tswv yim 6 ntawm kev xa xov (Relay6)

_

PIR1 qhib rau Relay5

PIR2 qhib rau Relay6

Kauj ruam 4: Programming Arduino

// Pins rau kev ua kom muaj peev xwm kov tau

#define TouchSensor1 22

#define TouchSensor2 23

#define TouchSensor3 24

#define TouchSensor4 25

// Pins rau PIR sensors

int PIR1 = 30; // int PIR2 = 31; //

int val1 = 0; int val2 = 1;

boolean currentState1 = LOW; boolean lastState1 = LOW;

boolean RelayState1 = LOW;

boolean currentState2 = LOW;

boolean lastState2 = LOW;

boolean RelayState2 = LOW;

boolean currentState3 = LOW;

boolean lastState3 = LOW;

boolean RelayState3 = LOW;

boolean currentState4 = LOW;

boolean lastState4 = LOW;

boolean RelayState4 = LOW;

// Pins rau relay

Int Relay1 = 26;

Relay2 = 27;

Int Relay3 = 28;

tso tawm Relay4 = 29;

Relay5 = 32; cov.

sib Relay6 = 33;

tsis muaj teeb tsa teeb tsa () {// txhais cov relays li tso tawm

pinMode (relay1, OUTPUT);

pinMode (relay2, OUTPUT);

pinMode (relay3, OUTPUT);

pinMode (relay4, OUTPUT);

pinMode (relay5, OUTPUT);

tus pinMode (relay6, OUTPUT);

// Txheeb xyuas qhov kov sensor li cov tswv yim

pinMode (TouchSensor1, INPUT);

pinMode (TouchSensor2, INPUT);

pinMode (TouchSensor3, INPUT);

tus pinMode (TouchSensor4, INPUT);

COV LUS QHUAB QHIA TXOG TUS DOWNLOAD hauv qab no

Nyem rau ntawm FILE X.ino mus rub tawm

Kauj Ruam 5: CIrcuit Diagram - Teeb Teeb rau Relay

CIrcuit Daim Duab - Teeb Lub Teeb rau Relay
CIrcuit Daim Duab - Teeb Lub Teeb rau Relay

Daim duab no yog piav qhia tus kheej.

Pom zoo: