Now you need to set up the Arduino development environment so that you can install the software on the Arduino Nano that controls the motors, for example. The next step after installing the development environment is to install the necessary libraries required by the OpenBot project.

Therefore I will now describe what needs to be installed on your computer to install the software on the Arduino Nano. I assume for my instructions that a Windows PC is used. However, it doesn’t make a difference if you use a MAC or Linux PC because the software components are the same and the principle of installation is the same.

Install Arduino development environment

The Arduino development environment is used, which can be downloaded free of charge and for which there are many instructions and assistance in the Internet.

Note: I used the ARDUINO 1.8.12 version for Windows 8.1 or Windows 10 for this tutorial.

The Arduino development environment can be downloaded from the following website.

Download: Arduino IDE (Please press the “Just download” button if you don’t want to make a donation)

Now that the Arduino IDE is installed, you can continue with the additional modules.

Install additional libraries

The following additional libraries must be installed. I describe how exactly this works using the NewPing library. The other two libraries are installed in exactly the same way.

  • NewPing
  • Adafruit SSD1306
  • Adafruit GFX

To install an additional library, go to “Tools” in the development environment menu and then to the menu item “Library Manager”. Here in the now opening window you can search for “NewPing” and install it directly.

NewPing library

NewPing library

Now you have to search for “Adafruit SSD1306” to install the appropriate library for the OLED display.

Adafruit SSD1306

Adafruit SSD1306

To be able to display the text on the OLED display properly, the “Adafruit GFX” library must be installed.

Adafruit GFX

Adafruit GFX

Now all preparations are finished and the firmware can be installed on the Arduino.

Load firmware

In order to install the firmware for the Arduino Nano the right board must be selected in the development environment.

  • Werkzeuge -> Board -> Arduino AVR Boards -> Arduino Nano
  • Tools -> Prozessor-> ATmega328P (Old Bootloader)
  • Tools -> Port -> *Wähle falls noch nicht geschehen den richtigen USB Port aus*

The following picture shows once again the settings that have to be made for the Arduino Nano. Since I didn’t have the Arduino Nano connected when I took the picture, the menu item with the USB port is grayed out. Normally the Arduino IDE automatically detects the USB port the Arduino Nano is connected to.

Arduino IDE config

Arduino IDE config

Now you just have to download the firmware file from the OpenBot project page. The latest version can always be found at the following link:

OpenBot: Firmware

Save the file on your computer and open it with the Arduino IDE. Please familiarize yourself now with the different options in the software.

I would like to briefly explain the most important setting options below. These must be set before the software is transferred to the Arduino itself.

  • #define OPENBOT DIY
    • This option determines whether you built the OpenBot out of single parts as described on my blog or whether you use a PCB.
  • #define NO_PHONE_MODE 1
    • If you don’t have a smartphone connected the OpenBot will start directly with option 1.
  • #define HAS_SONAR 1

The firmware is then uploaded to the Arduino Nano via the USB cable. Press the Upload button in the menu and it will be highlighted red in the following picture.

ESP32-CAM Arduino IDE Upload

ESP32-CAM Arduino IDE Upload

After the firmware is installed on the Arduino you can continue.


The concept of the OpenBot is already very well thought out and quite easy to implement. The installation of the additional libraries is very easy thanks to the Arduino IDE and I was able to install the firmware on the Arduino without any errors on the first try. My robot car started right away and drove through the apartment. In the next article I will talk about the Arduino app and the neural network that allows the robot car to drive autonomously.

Article Overview OpenBot robot cuto:

OpenBot – Your smartphone controls a robot car – Introduction
OpenBot – Your smartphone controls a robot car – needed parts part 1-2
OpenBot – Your smartphone controls a robot car – needed parts part 2-2
OpenBot – Your smartphone controls a robot car – constructing a chassis
OpenBot – Your smartphone controls a robot car – Wiring
OpenBot – Your smartphone controls a robot car – Flashing the Arduino firmware
OpenBot – Your smartphone controls a robot car – Android App and first test run
OpenBot – Your smartphone controls a robot car – Record training data
OpenBot – Your smartphone controls a robot car – Set up training environment
OpenBot – Your smartphone controls a robot car – train the neural network
OpenBot – Your smartphone controls a robot car – Setting up Android Studio and your Smartphone
OpenBot – Your smartphone controls a robot car – compile your own OpenBot Android app

Planned articles in this series:

OpenBot – Your smartphone controls a robot car – End-2-End run
(Visited 1,222 times, 3 visits today)