FlexSEA Wiki


User Tools

Site Tools


Getting Started With Raspberry Pi 4

Table of Contents


This document outlines the steps to installing the Dephy Actuator Package (ActPack) scripts on a brand-new Raspberry Pi 4 (RPi4).

Step by Step Setup

Assemble and power-up RPi4

  • If you purchased the Raspberry Pi 4 kit, set it up in the supplied case and attach heat sinks and fan if desired. See also this video: https://www.canakit.com/pi-case.
  • Insert the supplied MicroSD card pre-loaded with NOOBS v3.x or later in the slot located below the PCB.
  • Attach keyboard and mouse to USB ports (black inlay - USB 2.0 - recommended). This leaves the blue inlay USB 3.0 ports available for tests.
  • Attach monitor to Main Micro HDMI port (HDMI0). This is the port next to the USB-C power port.
  • Finally attach the USB-C power supply.
  • Raspberry Pi will boot-up.

Install OS and check for updates

  • Select language (near the bottom of the screen) and then the Recommended OS: Raspbian Full. Currently Raspbian Buster is the latest release.
  • Press “Install” on the Menu. RPi4 will begin the OS installation.
  • When installation is complete, RPi4 will reboot.
  • It will then walk you through the setup steps–choose region, language, keyboard. Select new password, or just press [Next] to keep defaults: User: “pi”, Password: “raspberry”.
  • Next RPi4 will ask to join a WiFi network.
  • Use apt (Advanced Packaging Tool) to check for updates. See also this external link for detailed instructions: https://www.raspberrypi.org/documentation/raspbian/updating.md . Run following commands:
sudo apt update
df -h                   # To check available free disk space
sudo apt full-upgrade   # Make sure you have sufficient free disk space
sudo apt clean          # Remove downloaded packages from /var/cache/apt/archives
df -h                   # Note additional space freed-up

Download Dephy Actuator-Package From GitHub

  • Open a terminal
  • Navigate to the directory where you want to save the files
  • Clone the repository:
git clone https://github.com/DephyInc/Actuator-Package
  • Need help with Git? Git Tips & Commands
  • This will clone the Dephy Actuator-Package to /home/pi/Actuator-Package
  • Now verify the Python 3.7.x is pre-installed on RPi4.
python3 --version
==> Python 3.7.3
cd Actuator-Package/Python
==> /home/pi/Actuator-Package/Python

Connect Dephy Actuator and Start Testing

  • Please please make sure that your power supply can output the required current. If a power supply cannot supply sufficient current, it might lead to system instability and unpredictable behavior.
  • Connect Dephy Actuator to power supply.
  • Connect Dephy Actuator to RPi4 via a USB cable.
  • Press and hold power button for 2s on the Actuator. LEDs will change color from Off to Blue.
  • Verify the Actuator is drawing some trickle current from the power supply (around 70mA).
  • Now that the Actuator is attached to RPi4, we need to determine what port was assigned to it and enter it into a configuration file.
    • One way to do this is to use the dmesg command. Look at the end for a new USB device. Ex.: ttyACM0.
    • Please note that to open the port you will need to use /dev/ttyACM0 and not just ttyACM0.
  • Copy Actuator-Package/Python/flexseapython/com_template.txt to a file named Actuator-Package/Python/flexseapython/com.txt
    • The first line is the baud rate. If connecting over USB or Bluetooth you can ignore the baud rate, otherwise please enter your desired rate.
    • Any line containing a '#' will be considered a comment.
    • The second line is the port name (ex.: COM5 or /dev/ttyACM0)
    • If connecting to more than one device you can add additional port names each on a new line

Running Python Scripts

The Python Interface page has all the information regarding normal operation. Some RPi4 specifics need to be mentioned:

  • The only Python package we had to install one one of our Pi is scipy (python3 -m pip install scipy). numpy, matplotlib and tornado were already installed and up to date.
  • On others we had to install everything. Run fxMain and read the error messages, they will tell you exactly what's missing.
  • If you get an error message that says “libf66blas” try running sudo apt-get install libatlas-base-dev


If you do not want to dedicate a monitor, mouse and keyboard to your Pi (or use a switch) you have the options of using SSH. It only takes a minute to setup.


Follow the official instructions: SSH (Secure Shell) - Raspberry Pi Documentation. All you have to do is enable SSH.

On a terminal call hostname -I and write down the IP address.

Windows 10

Open Power Shell and type ssh pi@<IP> where <IP> is the address you wrote down in the previous step. Enter your password, and that's it.

You can use the same command in Git Bash. It seems to provide a less flickery display.

gettingstartedrpi4.txt · Last modified: 2020/06/01 16:24 by alayne