filmov
tv
Chapter 1 | Nodemcu Esp8266 With 4 Channel Relay Module | IOT | Installation and Testing
Показать описание
In this video we have covered up the installation of the Nodemcu board and we have tested the Relay module with a simple program .
Kindly Copy paste the Links as mentioned in the video to upload codes . Also you can Copy Paste the entire test code .
Additional Board Manager's URL LInk :
( Click on this link and copy from the search bar , Don't forget to copy the entire link . then paste it on Additional Board manager's URL )
Test Code For 4 Channel Relay Module .
void setup() {
// put your setup code here, to run once:
pinMode(2 , OUTPUT); // D4
pinMode(13 , OUTPUT); // D7
pinMode(12 , OUTPUT); // D6
pinMode(14 , OUTPUT); // D5
digitalWrite(2 ,HIGH);
digitalWrite(13, HIGH);
digitalWrite(12,HIGH);
digitalWrite(14 , HIGH);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(2 , LOW);
delay(1000); // D4
digitalWrite(2 ,HIGH);
delay(1000);
digitalWrite(13 , LOW);
delay(1000); // D7
digitalWrite(13 ,HIGH);
delay(1000);
digitalWrite(12 , LOW);
delay(1000); // D6
digitalWrite(12 ,HIGH);
delay(1000);
digitalWrite(14 , LOW);
delay(1000); // D5
digitalWrite(14 ,HIGH);
delay(1000);
}
// PAGALCODER
Kindly Copy paste the Links as mentioned in the video to upload codes . Also you can Copy Paste the entire test code .
Additional Board Manager's URL LInk :
( Click on this link and copy from the search bar , Don't forget to copy the entire link . then paste it on Additional Board manager's URL )
Test Code For 4 Channel Relay Module .
void setup() {
// put your setup code here, to run once:
pinMode(2 , OUTPUT); // D4
pinMode(13 , OUTPUT); // D7
pinMode(12 , OUTPUT); // D6
pinMode(14 , OUTPUT); // D5
digitalWrite(2 ,HIGH);
digitalWrite(13, HIGH);
digitalWrite(12,HIGH);
digitalWrite(14 , HIGH);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(2 , LOW);
delay(1000); // D4
digitalWrite(2 ,HIGH);
delay(1000);
digitalWrite(13 , LOW);
delay(1000); // D7
digitalWrite(13 ,HIGH);
delay(1000);
digitalWrite(12 , LOW);
delay(1000); // D6
digitalWrite(12 ,HIGH);
delay(1000);
digitalWrite(14 , LOW);
delay(1000); // D5
digitalWrite(14 ,HIGH);
delay(1000);
}
// PAGALCODER