www.geolink.io
User Manual (1.4.0)
OpenTracker 2.4
13
Hands on recommendation for Relay usage
Only use car relays and certified cables inside vehicles!
A relay socket will ensure proper connection!
Don´t do it yourself if you are unsure what you are doing. Ask a car mechanic to do this connections
for you instead.
Please note:
It is not our responsibility to ensure you connect the relay the appropriate way. Always ensure
you read the specifications of the relay you intend to use and the devices you want to operate.
NEVER, work on circuitries under voltage.
ALWAYS, remain within the manufacturers specifications.
Using the Relay outputs (OUT1 / OUT2)
This example shows how to initialize the outputs and switch them on and off.
1.
void
setup() {
2.
// Relay output
3.
pinMode(PIN_C_OUT_1, OUTPUT);
// Initialize pin as output
4.
digitalWrite(PIN_C_OUT_1, LOW);
// Set PIN LOW
5.
pinMode(PIN_C_OUT_2, OUTPUT);
// Initialize pin as output
6.
digitalWrite(PIN_C_OUT_2, LOW);
// Set PIN LOW
7.
}
8.
9.
void
loop() {
10.
digitalWrite(PIN_C_OUT_1, HIGH);
// switch the relay on
11.
digitalWrite(PIN_C_OUT_2, HIGH);
// switch the relay on
12.
13.
delay(3000);
// wait
14.
15.
digitalWrite(PIN_C_OUT_1, LOW);
// switch the relay off
16.
digitalWrite(PIN_C_OUT_2, LOW);
// switch the relay off
17.
18.
delay(3000);
// wait
19.
}