14
Output configura on for GPIO4:
Jack 3.5 mm GPIO4 configura on
The GPIO configura on des GPIOs can be realized by edi ng some user preferences in the device configura on Web interface or thanks to a configura on script.
How to configure the Jack 3.5 mm connector:
//Set Jack 3.5 mm mode infrared
if (aDirection == "disable")
{
Services.prefs.setBoolPref("system.connector.jack35_1.1.io.uart_1.enabled", true);
}
else //Set Jack 3.5 mm mode GPIO
{
Services.prefs.setBoolPref("system.connector.jack35_1.1.io.uart_1.enabled", false);
}
// Set the Jack 3.5 mm direction: input or output
if (aDirection == "out")
{
Services.prefs.setBoolPref("innes.app-profile.gpio-input.jack35-gpio_1.jack35_1.*.authorized", false);
Services.prefs.setBoolPref("innes.app-profile.gpio-output.jack35-gpio_1.jack35_1.*.authorized", true);
Services.prefs.setBoolPref("system.connector.jack35_1.1.io.jack35-gpio_1.enabled", true);
}
else if (aDirection == "in")
{
Services.prefs.setBoolPref("innes.app-profile.gpio-input.jack35-gpio_1.jack35_1.*.authorized", true);
Services.prefs.setBoolPref("innes.app-profile.gpio-output.jack35-gpio_1.jack35_1.*.authorized", false);
Services.prefs.setBoolPref("system.connector.jack35_1.1.io.jack35-gpio_1.enabled", true);
}
else if (aDirection == "disable")
{
Services.prefs.setBoolPref("innes.app-profile.gpio-input.jack35-gpio_1.jack35_1.*.authorized", false);
Services.prefs.setBoolPref("innes.app-profile.gpio-output.jack35-gpio_1.jack35_1.*.authorized", false);
Services.prefs.setBoolPref("system.connector.jack35_1.1.io.jack35-gpio_1.enabled", false);
}
Phoenix connector
The Phoenix connector has 2 func ons:
the capability to drive with the GPIO1 a internal relay, allowing for example to open or close a electric door,
the capability to drive a peripheral or get the state of another peripheral thank to the GPIO2 and GPIO3.
PIN N°
Name
Write/Read
Driving
1
Internal relay PIN1
OUT
CPU/GPIO1
2
Internal relay PIN2
OUT
CPU/GPIO1
3
GPIO2
IN or OUT
CPU/GPIO2
4
GPIO3
IN or OUT
CPU/GPIO3
5
Ground
In case purchasing a male connector suitable for the peripheral, contact the provider WURTH and order the reference:
691 361 100 005
.
GPIO2/GPIO3 Electrical features
CPU/GPIO4
SMT210
Switch or dry loop
Input
2 (Jack)
3 (Jack)
PERIPHERAL
CPU/GPIO4
SMT210
Logic gate, transistor or opto-coupler
Output
Power supply
+
-
2 (Jack)
3 (Jack)
PERIPHERAL
I/O
SD CARD
SIM
1 2 3 4 5
1
2
3
4
5