top of page

How to setup a Pi-Zero for Real-time Control: The easiest step-by-step guide

Introduction

Here, I am going to explain how to setup Raspberry Pi Zero W for development of a RT control application. 

rpi.jpg
Setup Pi-Zero for Real-Time Control: Welcome

Get SD Card Image of RT-Linux for RPI

Setup Pi-Zero for Real-Time Control: Text

Write the image

  • Prepare an SD card. Here, I am using an 32GB micro SD card.

  • With an SD card writing tool (here, Etcher), write the image in the SD card.

  • https://www.balena.io/etcher/

Setup Pi-Zero for Real-Time Control: Text

Setup WIFI setup before the first booting

  • Open and modify the file “realtimepi-wpa-supplicant.txt” in the sd card for setting up the wifi access

    • network={
         ssid="testing"
         psk="testingPassword"
      }​

Setup Pi-Zero for Real-Time Control: Text

Setup a static IP address of Raspberry Pi Zero

  • Open /etc/dhcpcd.conf in the SD card file system and edit like this

  • interface wlan0

  • static ip_address=192.168.1.205/24

  • static routers=192.168.1.1

  • static domain_name_servers=192.168.1.1

  • In the address, 192.168.1.205/24, you may use different ip address e.g., 192.168.1.xxx/24. In this example I will use 192.168.1.205

  • If your router gateway is using different IP, (e.g., 10.1.10.1), then change the value 192.168.1 to these numbers. For details see this link below https://caffinc.github.io/2016/12/raspberry-pi-3-headless/

Setup Pi-Zero for Real-Time Control: Text

Insert the SD card in RPI and power on the RPI

  • Now, remove the SD card from your host PC, and insert it in RPI zero w.

  • HERE, DO NOT CONNECT ANY USB DEVICE DURING THE BOOTING TIME. IT WILL FREEZE THE RPI.

Setup Pi-Zero for Real-Time Control: Text

Search the IP address of Raspberry Pi Zero

  • Execute the following commands in your host computer to search the ip address. If you did correctly for the upper part, the IP should be 192.168.1.205

    • apt-get install nmap

    • sudo apt-get install nmap

    • hostname -I

    • nmap -sn 192.168.1.0/24

  • If everything works correctly, you can SSH the raspberry pi zero w in your host PC.​

    • ssh pi@192.168.1.205​

  • If everything is good, you should be able to access the RPI zero w with SSH.​

Screenshot_from_2018-11-25_12-01-29.jpg
Setup Pi-Zero for Real-Time Control: Text
Setup Pi-Zero for Real-Time Control: Text
bottom of page