Robobot 2b: Difference between revisions
(13 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Back to [[Robobot_B|Robobot]] | Back to [[Robobot_B|Robobot]] | ||
[[File:robobot-function-blocks.png | 500px]] | |||
The blocks marked with a blue dot are available in the repository as source code, and some may need an update. | |||
== Update software == | == Update software == | ||
Line 14: | Line 17: | ||
sudo apt dist-upgrade | sudo apt dist-upgrade | ||
The ''sudo'' is required to get administrator (super-user) privileges. | The ''sudo'' is required to get administrator (super-user) privileges. The password is the users password. | ||
=== Update the Robot software === | === Update the Robot software === | ||
Line 23: | Line 26: | ||
svn update | svn update | ||
If | If ''*.cpp'', ''*.h'', ''CMakeLists.txt'', or ''*.bash'' were updated, then an update is needed; see the next sections. | ||
=== Start-up scripts === | |||
If the Start-up script ''on_reboot.bash'' has changed, copy it to the home directory. | |||
cp ~/svn/robobot/setup/on_reboot.bash ~/ | |||
Any changes will not be implemented until after a reboot of the Raspberry Pi. | |||
sudo reboot now | |||
=== Recompile base software === | === Recompile base software === | ||
Line 42: | Line 55: | ||
==== Teensy - MQTT interface ==== | ==== Teensy - MQTT interface ==== | ||
The ''teensy_interface'' makes the robot interface | The ''teensy_interface'' makes the robot interface with the MQTT protocol and thus makes it available over the net. | ||
In the directory ''/home/local/svn/robobot/teensy_interface/build'': | In the directory ''/home/local/svn/robobot/teensy_interface/build'': | ||
Line 49: | Line 62: | ||
This should be recompiled if there are any changes. | This should be recompiled if there are any changes. | ||
Changes will be implemented after a reboot | Changes will be implemented after a reboot or the interface is restarted: | ||
pkill teensy_int | pkill teensy_int | ||
Line 62: | Line 75: | ||
cd /home/local/svn/robobot/teensy_firmware_8 | cd /home/local/svn/robobot/teensy_firmware_8 | ||
./compile | ./compile | ||
''(takes 5- | ''(takes 5-50 seconds)'' | ||
./upload | ./upload | ||
''Waiting for Teensy device...'' | ''Waiting for Teensy device...'' | ||
Line 71: | Line 84: | ||
[[file:PCB-with-power-upload-button.png | 700px]] | [[file:PCB-with-power-upload-button.png | 700px]] | ||
The ''power'' button ensures the power ( | The ''power'' button ensures the power (to the Raspberry) during the upload. | ||
If the power fails during upload, | If you have no Raspberry, then it is not an issue. | ||
If the power fails during upload, press and hold the ''power'' button while the Raspberry boots, and you log on and repeat the upload. | |||
After the upload, check the device name: | |||
ls /dev/ttyACM* | |||
''/dev/ttyACM1'' | |||
The device name will likely change from ''/dev/ttyACM0'' to ''/dev/ttyACM1''. In such a case, a reboot will change the device's name to ''/dev/ttyACM0''. | |||
To reboot, send the Teensy a ''reboot'' command: | |||
echo "reboot" >/dev/ttyACM1 | |||
A power cycle or another ''./upload'' will do the trick too. |
Latest revision as of 09:19, 26 January 2025
Back to Robobot
The blocks marked with a blue dot are available in the repository as source code, and some may need an update.
Update software
Once connected to the Raspberry Pi of the robot, update the software:
Update operating system
The operating system is the recommended PI-OS 64bit system build on Debian.
Update using the commands:
sudo apt update sudo apt dist-upgrade
The sudo is required to get administrator (super-user) privileges. The password is the users password.
Update the Robot software
The Robobot software is on an SVN (subversion) repository, update to newest version using:
cd svn/robobot svn update
If *.cpp, *.h, CMakeLists.txt, or *.bash were updated, then an update is needed; see the next sections.
Start-up scripts
If the Start-up script on_reboot.bash has changed, copy it to the home directory.
cp ~/svn/robobot/setup/on_reboot.bash ~/
Any changes will not be implemented until after a reboot of the Raspberry Pi.
sudo reboot now
Recompile base software
When connected to the robot recompile the relevant software:
IP display
The ip_disp can show the robots IP on the robot display, it further monitors the start button and starts the Python mission app.
In the directory /home/local/svn/robobot/ip_disp/build:
cd /home/local/svn/robobot/ip_disp/build make -j3
This should be recompiled if there are any changes.
Teensy - MQTT interface
The teensy_interface makes the robot interface with the MQTT protocol and thus makes it available over the net.
In the directory /home/local/svn/robobot/teensy_interface/build:
cd /home/local/svn/robobot/teensy_interface/build make -j3
This should be recompiled if there are any changes. Changes will be implemented after a reboot or the interface is restarted:
pkill teensy_int ./teensy_interface -l
The Teensy 4.1 firmware
The Robobot version of the Teensy firmware handles all (most) of the sensor and actuator interfaces.
The firmware in the /home/local/svn/robobot/teensy_firmware_8 directory:
cd /home/local/svn/robobot/teensy_firmware_8 ./compile (takes 5-50 seconds) ./upload Waiting for Teensy device... (hint: press the reset button)
Do not press the reset button (the small button on the Teensy board) without pressing and holding the power button on the main board during the upload. See here for details on mainboard buttons.
The power button ensures the power (to the Raspberry) during the upload. If you have no Raspberry, then it is not an issue.
If the power fails during upload, press and hold the power button while the Raspberry boots, and you log on and repeat the upload.
After the upload, check the device name:
ls /dev/ttyACM* /dev/ttyACM1
The device name will likely change from /dev/ttyACM0 to /dev/ttyACM1. In such a case, a reboot will change the device's name to /dev/ttyACM0.
To reboot, send the Teensy a reboot command:
echo "reboot" >/dev/ttyACM1
A power cycle or another ./upload will do the trick too.