Robot Buggy Module 2 – Installing Software

Overview

Installing software will be your first task when starting with a new RaspberryPi controller. You will need to select and install an Operating System and the supporting software for code development and robot control. 

Which OS version?

The operating system used depends on how the Robot Buggy will operate, and what additional tools are available for project development.  

If the RaspberryPi Zero will be your coding platform, you will want to install a full Raspbian OS Desktop Environment, and use the RaspberryPi Zero with a keyboard, mouse, and monitor. This is suitable only during the code development stages of the project. Our buggies can’t move around when attached to a KVM system. 🙂.

But if another coding platform is available, such as one of The Rabbithole’s  RaspberryPi 400 or Dell Desktop systems, the buggy can be configured with a microSD card for  ‘Headless’ operation without a KVM. ‘Headless’ operation is suitable for fully autonomous operation or remote control operation through WiFi. If you have the additional development tools available, and you want to install a more responsive lightweight operation, you will want to install the latest version of Raspbian Lite and prepare  the microSD card the for ‘Headless’ Operations.

Python Essentials

Whether operating with a full Desktop OS or Raspbian Lite, this project is programmed in Python using the GPIO Zero software library and Class Robot.  If not yet installed, install Python and the GPIO software interface.

These are essential to the most basic lessons; the gpiozero software library is the interface between the Python code you will be writing and the RaspberryPi’s General Purpose Input Output (GPIO) hardware interface, The gpiozero library also contains the code definition and Application Programmers Interface for Python’s Class Robot with its methods for controlling the Buggy’s left and right motors.

Any further add-ons to your Python code will be noted in sections where required.

Connect to your Raspberry Pi

Depending on your hardware and chassis design, the microSD card and USB power input on the Robot Buggy’s Raspberry Pi may not be accessible. If needed, loosen the bolts to get to it, and remove completely if need be for configuration and initial connection tests. Our base design allows access to the RaspberryPi’s SD, HDMI, and micro-USB ports.

Put the microSD card into the robot’s Raspberry Pi. You can power this Raspberry Pi from a USB cable during setup. When the lights stop flashing, the Robot Buggy’s Raspberry Pi has booted and should be ready to contact via WiFi if the SD card is fully configured for Headless Operation.  Otherwise, the RaspberryPi will need a Keyboard, Video Display, and Mouse (KVM) to complete its configuration for WiFi and Secure-Shell (SSH) access. 

Raspberry Pi has a guide for finding your device on the network (as well as useful guidance configuring Secure She’ll for remote access) . By default, it’s  called raspberrypi.local, but you can change this following the instructions at Change RaspberryPi Hostname.

Since your Robot Buggy is mobile, SSH is the right way to interact with it in operation. For this, the RaspberryPi must be configured to enable its SSH Server, which is disabled by default. See the guidance SSH Remote Control for instructions on enabling the RaspberryPi SSH server; the site also has guidance on installing and configuring SSH clients on the platform(s) you might use for remote control.