In case of powering and controlling a relay module, we highly recommend using the hSense1 port.
By default hSense2 and hSense3 are reserved for a GPS and an IMU module.
Connect the relay board to the hSens1 port using the IDC plug. Pins 1-4 are dedicated for signals, pin 5 is +5V and the last one is GND.
hSens pi
Module pin
1
CH1
2
CH2
3
CH3
4
CH4
5
+5V
6
GND
Flash the dedicated firmware
We developed a version of the leo_firmware with added features for controlling the relays.
Make sure you have the git tool installed on your system, then clone firmware repository to any folder on your computer and change the branch to feature/relay:
The next step is to compile the firmware in case of creating the .hex file. Do it according to the first two paragraphs of the Firmware development tutorial. As a result, you should have the .hex file.
To flash compiled firmware directly from the computer you can follow the third paragraph of the Firmware development tutorial or upload the .hex file to the LeoRover home directory and use the flasher script as described in the Firmware update tutorial.