Skip to content

Commit b0a269d

Browse files
Update content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/content.md
Co-authored-by: Julián Caro Linares <[email protected]>
1 parent d960249 commit b0a269d

File tree

1 file changed

+26
-27
lines changed
  • content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started

1 file changed

+26
-27
lines changed

content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started/content.md

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -207,53 +207,52 @@ The entire sketch can be found below, copy it into your IDE and upload it to you
207207

208208
```arduino
209209
void setup() {
210-
// initialize Relays outputs.
211-
pinMode(D0, OUTPUT); // sets the rele pin D0 as output
212-
pinMode(D1, OUTPUT); // sets the rele pin D1 as output
213-
pinMode(D2, OUTPUT); // sets the rele pin D2 as output
214-
pinMode(D3, OUTPUT); // sets the rele pin D3 as output
210+
// Initialize Relays outputs
211+
pinMode(D0, OUTPUT);
212+
pinMode(D1, OUTPUT);
213+
pinMode(D2, OUTPUT);
214+
pinMode(D3, OUTPUT);
215215
216-
// initialize digital pin LED_BUILTIN as an output.
216+
// Initialize OPTA LEDs
217217
pinMode(LED_D0, OUTPUT);
218218
pinMode(LED_D1, OUTPUT);
219219
pinMode(LED_D2, OUTPUT);
220220
pinMode(LED_D3, OUTPUT);
221221
}
222222
223223
void loop() {
224-
// closes and opens the contcat of the relay 1 and turns on led 1.
225-
digitalWrite(D0, HIGH); // sets the Rele 1 on
224+
// Closes and opens the contact of relay 1 and turns on led 1
225+
digitalWrite(D0, HIGH); // Sets the relay 1 on
226226
digitalWrite(LED_D0, HIGH);
227-
delay(1000); // waits for a second
228-
digitalWrite(D0, LOW); // sets the Rele 1 off
227+
delay(1000);
228+
digitalWrite(D0, LOW); // Sets the relay 1 off
229229
digitalWrite(LED_D0, LOW);
230-
delay(1000); // waits for a second
230+
delay(1000);
231231
232-
// closes and opens the contcat of the relay 2 and turns on led 2
233-
digitalWrite(D1, HIGH); // sets the Rele 1 on
232+
// Closes and opens the contact of relay 2 and turns on led 2
233+
digitalWrite(D1, HIGH); // Sets the relay 2 on
234234
digitalWrite(LED_D1, HIGH);
235-
delay(1000); // waits for a second
236-
digitalWrite(D1, LOW); // sets the Rele 1 off
235+
delay(1000);
236+
digitalWrite(D1, LOW); // Sets the relay 2 off
237237
digitalWrite(LED_D1, LOW);
238-
delay(1000); // waits for a second
238+
delay(1000);
239239
240-
// closes and opens the contcat of the relay 3 and turns on led 3
241-
digitalWrite(D2, HIGH); // sets the Rele 1 on
240+
// Closes and opens the contact of relay 3 and turns on led 3
241+
digitalWrite(D2, HIGH); // Sets the relay 3 on
242242
digitalWrite(LED_D2, HIGH);
243-
delay(1000); // waits for a second
244-
digitalWrite(D2, LOW); // sets the Rele 1 off
243+
delay(1000);
244+
digitalWrite(D2, LOW); // Sets the relay 3 off
245245
digitalWrite(LED_D2, LOW);
246-
delay(1000); // waits for a second
246+
delay(1000);
247247
248-
// closes and opens the contcat of the relay 4 and turns on led 4
249-
digitalWrite(D3, HIGH); // sets the Rele 1 on
248+
// Closes and opens the contact of relay 4 and turns on led 4
249+
digitalWrite(D3, HIGH); // Sets the relay 4 on
250250
digitalWrite(LED_D3, HIGH);
251-
delay(1000); // waits for a second
252-
digitalWrite(D3, LOW); // sets the Rele 1 off
251+
delay(1000);
252+
digitalWrite(D3, LOW); // Sets the relay 4 off
253253
digitalWrite(LED_D3, LOW);
254-
delay(1000); // waits for a second
254+
delay(1000);
255255
}
256-
```
257256
258257
*** Important: It is not possible to program the Opta while it is being powered with the power pins. You would need to disconnect the power supply, upload the program and then connect the power again. ***
259258

0 commit comments

Comments
 (0)