In this tutorial, we will show you how to configure and remotely control relays via additional user's web interface.
Connect to the Rover through SSH
Make sure the Rover is connected to the internet
1. Connect the relay board to Core2-ROS
In the tutorial we are using hSens1 port to connect relays to the board.
Connect the relay board to hSens1 port using IDC plug. Pins 1-4 are for signals, 5 is +5V and the last one is GND.
Well done! Hardware is ready
2. Flash a dedicated firmware to enable hSense1 port 1. Download a dedicated firmware
2. Upload the downloaded .hex file to your Rover
Make sure you are in the home directory (
/home/husarion) and type:
The process of flashing should begin. After it completes, type:
sudo systemctl restart leo
to restart ROS serial node.
Troubleshooting - if bootloader not flashed
If you have a brand new CORE2 board (never flashed), you may need to flash its bootloader for a firmware to work.
Download the bootloader from here and upload it to your Rover or, if you connected the Rover to the Internet, just type:
Then, type the following commands:
Now you can get back to the firmware flashing operation.
3. Add user web interface to nginx server 1. Clone a repository that contains a relay interface from GitHub
git clone https://github.com/LeoRover/leo_ui_sample_relay.git
How to control the relays via user interface 1. Connect to the Rover wifi network 2. Open web browser and type 10.0.0.1:90