How to setup a Raspberry Pi 3 for Real-time Control: The easiest step-by-step guide
Here, I am going to explain how to setup Raspberry Pi 3 for development of a RT control application.
Get SD Card Image of RT-Linux for RPI
- Get the pre-compiled SD card image in the link below
- In this tutorial, I am using an image located in the folder of this document
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.
Setup a static IP address of Raspberry Pi
- Open /etc/dhcpcd.conf in the SD card file system and edit like this
- interface eth0
- static ip_address=192.168.1.105/24
- static routers=192.168.1.1
- static domain_name_servers=192.168.1.1
- In the address, 192.168.1.105/24, you may use different ip address e.g., 192.168.1.xxx/24. In this example I will use 192.168.1.105
- 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/
Insert the SD card in RPI and power on the RPI
- Now, remove the SD card from your host PC, and insert it into your RPI.
- Here, do not connect any USB device during the booting time. It could freeze the RPI.
Search the IP address of Raspberry Pi
- 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
- If everything works correctly, you can SSH the raspberry pi in your host PC.
- If everything is good, you should be able to access the RPI w with SSH.