Skip to content

Commit 7854721

Browse files
authored
Merge pull request #2748 from Salmanktk/patch-1
Update 4-relay-shield-basics.md
2 parents 42188e5 + ec8cb1b commit 7854721

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/hardware/02.uno/shields/4-relays-shield/tutorials/4-relay-shield-basics/4-relay-shield-basics.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ We will now get to the programming part of this tutorial.
7979

8080
First, let's take a look at how we will activate our relays. We are actually not using a library, as the operation is very basic.
8181

82-
- `int relay_1 = 4;` - assigns `relay_1` to pin 4. It is important that we assign it to pin 1, as the relay is internally wired to this pin.
83-
- `int relay_2 = 7;` - assigns `relay_2` to pin 7. Same here, the relay is wired to pin 2, so we can't use a pin of our choosing.
84-
- `int relay_3 = 8;` - assigns `relay_3` to pin 8. Same here, the relay is wired to pin 2, so we can't use a pin of our choosing.
85-
- `int relay_4 = 12;` - assigns `relay_4` to pin 12. Same here, the relay is wired to pin 2, so we can't use a pin of our choosing.
82+
- `int relay_1 = 4;` - assigns `relay_1` to pin 4. It is important that we assign it to pin 4, as the relay is internally wired to this pin.
83+
- `int relay_2 = 7;` - assigns `relay_2` to pin 7. Same here, the relay is wired to pin 7, so we can't use a pin of our choosing.
84+
- `int relay_3 = 8;` - assigns `relay_3` to pin 8. Same here, the relay is wired to pin 8, so we can't use a pin of our choosing.
85+
- `int relay_4 = 12;` - assigns `relay_4` to pin 12. Same here, the relay is wired to pin 12, so we can't use a pin of our choosing.
8686
- `pinMode(relay_X, OUTPUT)` - configures relay 1 to be an `OUTPUT`.
8787
- `digitalWrite(relay_X, state)` - write either a high or low state to relay 1.
8888

0 commit comments

Comments
 (0)