top of page
Software

In this part of the instructions, we will go over installation of the eduROV software and program the microcontroller. Most steps are explained in the python documentation for the eduROV package found by clicking the button below.

Raspberry Pi setup

Components

Tools

  • Access to WiFi

  • 5V USB power supply appropriate for the Pi you have

    • It needs to supply minimum 2.5 A​

    • You can also use the power supply from the ROV if it is finished

Procedure

First, install the operating system onto the SD card. I recommend using the official "Raspberry Pi Imager" for this, but select "Use custom" all the way at the bottom of the OS selection menu and select the file:     2022-04-04-raspios-buster-armhf.img.xz, from this download link. Go ahead and set up ypur desired hostname, login credentials and WiFi SSID and password and the WiFi country you are in before you flash the OS to the SD card. Adding the WiFi details here, means that you do not need a screen to set up the Raspberry Pi at all. 

Insert the SD-card into the Pi, plug in the screen, keyboard and mouse and start it by plugging in the power cable. Wait until the Pi is booted up, and you see the desktop. Open the Menu -> Preferences -> Raspberry Pi Configuration. If you already set up the WiFi details during flashing, these same settings can be applied over SSH using the "sudo raspi-config" command.

These same settings can also be accessed directly from the terminal (or through SSH, more on that later) by typing in "sudo raspi-config" in the terminal. In the terminal, you only use the keyboard to navigate, arrow keys and enter, etc.

1) In the "System" tab of the configuration:

  • Change the password of the Pi, this is very important because the default password is known to everyone on the internet! Change it to something you remember, or write it down.

  • Change the hostname, this name is used to identify the Pi on a network. If you have more than one Raspberry Pi, or you are on a network where more than one Raspberry Pi is connected, it may lead to problems if all of them have the same hostname.  Write down the hostname so you remember it.

2) In the "interfaces" tab of the configuration:

  • Enable SSH

  • Enable SPI

  • Enable Serial

  • Enable Camera

  • The other functions are not needed for the eduROV

 

 

 

 

 

3) In the "localisation" tab of the configuration:

  • Change WiFi-Country to Norway (or the country you are in)

  • If your keyboard has a different layout than english (you see this by symbols and special characters being in the wrong place when you try to write), change the keyboard layout to the correct type. In Norway, set it to Norwegian etc

  • Locale and timezone can also be set to what is valid for you, but this is not absolutely neccesary

4) Log into the available WiFi network

  • Update and upgrade all installed programs using the two following command line tools. This must be done for the Pi to find and install the edurov program.

  • "sudo apt-get update" - Linux works with something called a package handler. What this does is keep lists of what version is the newest for all available programs, and which programs are available for installation. The "apt-get update" command updates these lists so they are up to date. 

  • "sudo apt-get upgrade -y" - is the command to actually upgrade installed programs to the latest version. This is a good idea to do regularly, to get the latest security updates and functionality. The "-y" in the command tells the Raspberry Pi to say YES to all questions regarding installation. This can be left out, then you have to say yes manually during the installation process.

PC to Pi connection

Components

  • Raspberry Pi

  • Ethernet cable

  • PC - Mac, Windows or Linux

Tools

  • USB to ethernet dongle, if the computer does not have an ethernet plug

  • 5V micro-usb power supply

    • minimum 2.5 A

Nice to have

  • USB keyboard

  • USB mouse

  • HDMI monitor

Procedure

In this step, we will make it possible to connect the Raspberry Pi to your computer, so you don't have to use the separate screen, keyboard and mouse any longer. The process is a little bit different from Windows, Linux and Mac computers. But it is possible to do for all of them.

Some quick words about networks and IP addresses, you don't really need to understand this to talk to the Pi, but it may make troubleshooting a bit easier if you experience problems. When computers or devices are connected together, we call that a network, and we can talk about local and global networks. In our case we will only be working on the local network, which can be either over WiFi or through a wired connection. The global network makes up the internet, where we can access websites, servers and such. Communication on the global network requires a bit more knowledge about security and communication protocols than we are going to worry about here. Feel free to explore this on your own, it is a very interesting field. On our home network, the communication with the global network is taken care of by your network provider through your modem and router.

The local network consists of all devices connected either directly together, or through your home router. These days that is typically a WiFi router. All computers, phones, Raspberry Pies etc connected to your router is on the same local network. Also called LAN (local area network). In order to identify different devices on this local network, all devices are given an IP address, usually from the router. On an general basis, these IP addresses are set up i a dynamic fashion. Meaning that they may change when you reconnect your device. In addition to this IP address, devices can broadcast their own hostname on the network. This hostname will be the same every time the device connects, and is therefore a more predictable. For computers running MacOS or Linux, devices can be identified using the hostname on the local network by typing in "hostname.local". For this to work on Windows computers, you need to install a program called "Bonjour print services". 

In order to connect one device (for example your computer) to another device (such as a Raspberry Pi) over a network, we need to be able to identify the device we connect to, and we need a tool to communicate. For the eduROV, we suggest using a unique hostname and communicating through SSH (Secure SHell). The hostname you define in the configuration of the Raspberry Pi (as explained in the previous section). Follow the steps below for a step-by-step walkthrough.

Checklist for the Raspberry Pi:

  • SSH is activated

  • The Pi has a unique hostname

  • You have a new password on your Pi

If you use a Windows PC:

  • Install Bonjour Print service

    • During installation, uncheck the box suggesting automatic updates

  • Install Putty, which is an SSH client. A program that can communicate on the network using SSH​

  • Connect to the Raspberry Pi by typing in "hostname.local" in Putty. (exchange hostname with the one you made for the Pi, for example: if your hostname is group5, you connect by writing "group5.local")

  • You will be prompted with a question of adding the Pi to a local register, say "Yes" here and continue

  • You will then be asked to "log in" to the Pi, this is where you write the username, which is "pi"

  • Followed closely by the password, this is the password you set previously

  • You are now in the terminal window of your Raspberry Pi!

If you use a Mac:

  • Open a terminal window

  • Connect to the pi by writing: "ssh pi@hostname.local"

  • You may be prompted with a question of adding the Pi to a local register, say "Yes" here and continue

  • You will then be asked to "log in" to the Pi, this is where you write the username, which is "pi"

  • Followed closely by the password, this is the password you set previously

  • You are now in the terminal window of your Raspberry Pi!

Every time you want to start the ROV, you will need to repeat these steps to connect to the Pi. The terminal may seem scary to you, but it is only a way of controling the computer without a screen and the graphical user interface we are used to. 

You can read about using the terminal here, on the Raspberry Pi website. We will only be using a few simple commands:

  • sudo - is a keyword which gives us administrative rights. Or root previliges as they call it

  • halt - is a command for turning off the Raspberry Pi

  • reboot - is the command for restarting the Raspberry Pi

  • apt-get - is a package handler, it can install and uninstall programs for us

  • pip - is a package handler specifically for Python programs (Python is a programming language, and what the eduROV program is written in)

Now we are ready to install the edurov program 😊

If you are experiencing problems with finding the Raspberry Pi from your computer, you might need to activate network discovery, check this by opening the Network and Sharing centre on your PC.

Relevant links and resources:

Raspberry Pi website, how to find the IP address of your Pi

Bonjour services - install for Windows

Putty SSH program for Windows

Download the newest version of Raspbian

DHCP Server - for Windows. An alternative to using hostname

If you want to reinstall the Raspbian operating system, or you have an SD card without NOOBS or Raspbian installed. You will need these programs:

Etcher - for writing the operating system to the SD card - works on Mac, Windows and Linux

SD card formatter - for properly formatting old SD cards - works on Mac and Windows

EduROV software installation and startup

Components

  • Raspberry Pi - with finished initial setup

  • Raspberry Pi camera

Nice to have:

  • Programmed Arduino

  • SenseHAT

Tools

  • PC with internet access

  • Router with internet acces (for the raspberry pi)

Nice to have:

  • USB keyboard

  • USB mouse

  • HDMI monitor

Procedure

Connect your Raspberry Pi to your computer, and make sure the Raspberry Pi is connected to the internet. A WiFi connection is the most flexible. If you connected the Pi to your wifi before, it will reconnect by itself.

The neccesary steps for installation of the eduROV program is shown both in the video and from the website linked to above here. "eduROV python program instructions". 

It is good practice to always turn off the Raspberry Pi using the command "sudo halt" before you unplug the power cable or the battery from the ROV. There is a risk that simply unplugging the power can corrupt the files of the operating system running of the Pi.

"sudo halt"

Arduino installation

Components

  • Arduino Micro

  • Micro USB cable

Tools

  • PC with internet access

Procedure

First off all, you will have to download and install the Arduino IDE to your computer. Find a link at the bottom of this section. If you are not familliar with the Arduino, I suggest you have a look at this introduction video:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

In stead of using the Arduino UNO, we will be using an Arduino Micro, so remember to set the correct board in the IDE. Tools -> board -> Arduino/Genuino Micro.

The Arduino code for the eduROV can be downloaded from our GitHub repository, you find the link at the bottom of this section.

This video shows the steps of the process, including downloading the Arduino code:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Usefull links:

Arduino website

eduROV github repository

Step 1 - Raspberry Pi setup
Step 2 - PC to Pi connection
Step 4 - Programming the Arduino
Step 3 - installing eduROV
Design files

All the code that is used to run the eduROV is of course also available open-source. We have a github repository which contains the Arduino code and the Python-script that is used.

Design files
bottom of page