PRD-000847
New product
This product is no longer in stock
Warning: Last items in stock!
Availability date:
Step 1: Gather the Required Equipment:
Step 2: Understand the 5V Relay Module KY-019:
Step 3: Connect the 5V Relay Module KY-019 to the Breadboard:
Step 4: Control the 5V Relay Module KY-019:
#define RELAY_PIN 2 // Pin number to which the SIG pin of the relay module is connected
void setup() {
pinMode(RELAY_PIN, OUTPUT); // Set the relay pin as output
}
void loop() {
digitalWrite(RELAY_PIN, HIGH); // Turn on the relay
delay(1000); // Wait for 1 second
digitalWrite(RELAY_PIN, LOW); // Turn off the relay
delay(1000); // Wait for 1 second
}
Note: Be sure to connect the relay module to an external power source if you are controlling high-current devices, as the Arduino pins may not be able to provide enough current to drive the relay directly.
That's it! You have successfully connected and controlled a 5V Relay Module KY-019 using an Arduino Uno.
Photoresistor is a resistor which made of...
0,20 €
Pinout for ESP8266 WiFi module. Compatible with...
0,30 €
Connector: Jumper Type of connector: Pin...
0,05 €
Mounting: THT Max. off-state voltage: 75-100V...
0,05 €
Pitch: 2.54mm Thickness : 1.6mm Plated through...
0,70 €
Portable USB LED with white light Number of...
0,80 €