Pironman V2.0- SunFounder Mini PC Kit for Raspberry Pi

Thanks for choosing our Pironman V2.0.

Note

This document is available in the following languages.

Please click on the respective links to access the document in your preferred language.

Note

We offer two versions of Pironman. It’s crucial to note that the scripts in each version’s online tutorial are not interchangeable.

To ensure the proper setup, you’ll need to identify your version using the short link provided in your instruction sheet:

  • If the link is “pironman-v2.rtfd.io”, continue with this tutorial.

  • If the link displays “pironman.rtfd.io”, kindly follow the tutorial at Pironman V1.0.

_images/about_version.jpg
_images/pironman.png

Pironman is SunFounder’s customized Mini PC for Raspberry Pi. Just connect the screen, mouse and keyboard, and you can use it for projects, entertainment and office.

  • Small size of 4.43’’ x 2.69’’ x 4.68’’

  • Raspberry Pi mini PC

  • Tower cooler can cool a 100% CPU load Pi to 39°C at 25°C room temperature

  • 0.96” OLED Display showing Raspberry Pi’s CPU usage, temperature, disk usage, IP address, RAM usage etc

  • Onboard USB to M.2 SATA SSD, TRIM supported

  • RGB Fan, with GPIO control

  • 16 WS2812 Addressable RGB LEDs

  • IR Receiver for multi-media center like Kodi or Volumio

  • External GPIO extender with pin name label

  • Power status memory, remembers the power status, automatically boot after accident power cut off

  • Aluminum main body with clear Acrylic side panel

Note

Please find links below to configurations for the WS2812 RGB Strip and M.2 SATA SSD.

Note

Pironman compatible systems are shown below. If you have other systems installed, some of the Pironman components may not be available.

_images/compitable_system_hm.png

If you have any questions, please send an email to service@sunfounder.com and we will respond as soon as possible.

About the display language

This document is available in other languages as well. To switch the display language, kindly click on the Read the Docs icon located in the lower left corner of the page.

_images/translation.png

1. What Else Should We Prepare?

Required Components

  • Raspberry Pi 4 Model B

    Pirionman is fully compatible with Raspberry Pi 4 Model B.

  • 5V/3A Power Adapter

    This 5V/3A power adapter plugs into Pironman’s Power connector and powers all components. You can power the Raspberry Pi 4 separately if you are also connecting other devices that consume a lot of power.

  • Micro SD Card

    As the Raspberry Pi is completely enclosed in the Pironman, we have reserved an additional micro SD port for you. The micro SD card you use should have a capacity at least 8GB.

Optional Components

  • M.2 SATA SSD

    Note

    • The M.2 SSD interface only supports SATA protocol, not NVME/PCIe.

    • For more information on how to mount SSD to Pironman and the related configuration, please refer to :SATA M.2 SSD.

    In the Pironman’s mainboard, there is an M.2 SSD connector for installing your M.2 SSD.

    An M.2 SSD is a small form factor solid-state drive (SSD) that is used in internally mounted storage expansion cards. M.2 SSDs conform to a computer industry specification and are designed to enable high-performance storage in thin, power-constrained devices, such as ultrabook laptops and tablet computers.

  • Screen

    To view the desktop environment of Raspberry Pi, you need to use the screen that can be a TV screen or a computer monitor. If the screen has built-in speakers, the Pi plays sounds via them.

  • Micro HDMI Cable

    There are two Micro HDMI output ports on the Raspberry Pi 4 Model B, and you will need a converter cable to connect it to your screen.

  • Mouse & Keyboard

    When you use a screen, a USB keyboard and a USB mouse are also needed.

  • Sound or Earphone

    The Raspberry Pi is equipped with an audio port about 3.5 mm that can be used when your screen has no built-in speakers or when there is no screen operation.

2. Component List and Assembly Instructions

Before assembling the Pironman, please first verify that all parts and components have been included. If there are any missing or damaged components, please contact SunFounder immediately at service@sunfounder.com to resolve the issue as soon as possible.

Please follow the steps on the following PDF for assembly instructions:

Assemble Tutorial Video

Connect the OLED Screen


Connect the GPIO Bridge


Connect the SD Card Bridge


3. Installing the OS (Common)

Note

If you want to use Home Assistance, please Install the HassOS .

Note

  • If your Raspberry Pi has the following Pironman-compatible systems installed, you can skip this chapter.

    _images/compitable_system.png

Step 1

Raspberry Pi have developed a graphical SD card writing tool that works on Mac OS, Ubuntu 18.04 and Windows, and is the easiest option for most users as it will download the image and install it automatically to the SD card.

Visit the download page: https://www.raspberrypi.org/software/. Click on the link for the Raspberry Pi Imager that matches your operating system, when the download finishes, click it to launch the installer.

_images/image11.png

Step 2

When you launch the installer, your operating system may try to block you from running it. For example, on Windows I receive the following message:

If this pops up, click on More info and then Run anyway, then follow the instructions to install the Raspberry Pi Imager.

_images/image12.png

Step 3

Insert your SD card into the computer or laptop SD card slot.

Step 4

In the Raspberry Pi Imager, select the OS that you want to install and the SD card you would like to install it on.

_images/image13.png

Note

  • You will need to be connected to the internet the first time.

  • That OS will then be stored for future offline use(lastdownload.cache, C:/Users/yourname/AppData/Local/Raspberry Pi/Imager/cache). So the next time you open the software, it will have the display “Released: date, cached on your computer”.

Step 5

Select the SD card you are using.

_images/image14.png

Step 6

Press Ctrl+Shift+X or click the setting icon to open the Advanced options page to enable SSH and set username and password.

Note

  • Now that the Raspberry Pi doesn’t have a default password, you will need to set it yourself. Also, the username can be changed.

  • For remote access, you will also need to enable SSH manually.

_images/image15.png

Then scroll down to complete the wifi configuration and click SAVE.

Note

wifi country should be set the two-letter ISO/IEC alpha2 code for the country in which you are using your Raspberry Pi.

_images/image16.png

Step 7

Click the WRITE button.

_images/image17.png

Step 8

If your SD card currently has any files on it, you may wish to back up these files first to prevent you from permanently losing them. If there is no file to be backed up, click Yes.

_images/image18.png

Step 9

After waiting for a period of time, the following window will appear to represent the completion of writing.

_images/image19.png

4. Set up Your Raspberry Pi

If You Have a Screen

If you have a screen, it will be easy for you to operate on the Raspberry Pi.

Required Components

  • Any Raspberry Pi

  • 1 * Power Adapter

  • 1 * Micro SD card

  • 1 * Screen Power Adapter

  • 1 * HDMI cable

  • 1 * Screen

  • 1 * Mouse

  • 1 * Keyboard

  1. Insert the SD card you’ve set up with Raspberry Pi OS into the micro SD card slot on the underside of your Raspberry Pi.

  2. Plug in the Mouse and Keyboard.

  3. Connect the screen to Raspberry Pi’s HDMI port and make sure your screen is plugged into a wall socket and switched on.

    Note

    If you use a Raspberry Pi 4, you need to connect the screen to the HDMI0 (nearest the power in port).

  4. Use the power adapter to power the Raspberry Pi. After a few seconds, the Raspberry Pi OS desktop will be displayed.

    _images/login1.png

If You Have No Screen

If you don’t have a monitor, you can remotely log into your Raspberry Pi.

You can apply the SSH command to open the Raspberry Pi’s Bash shell. Bash is the standard default shell for Linux. The shell itself is a command (instruction) when the user uses Unix/Linux. Most of what you need to do can be done through the shell.

If you’re not satisfied with using the command window to access your Raspberry Pi, you can also use the remote desktop feature to easily manage files on your Raspberry Pi using a GUI.

See below for detailed tutorials for each system.

Mac OS X user

For Mac users, accessing the Raspberry Pi desktop directly via VNC is more convenient than from the command line. You can access it via Finder by entering the set account password after enabling VNC on the Raspberry Pi side.

Note that this method does not encrypt communication between the Mac and Raspberry Pi. The communication will take place within your home or business network, so even if it’s unprotected, it won’t be an issue. However, if you are concerned about it, you can install a VNC application such as VNC® Viewer.

Alternatively it would be handy if you could use a temporary monitor (TV), mouse and keyboard to open the Raspberry Pi desktop directly to set up VNC. If not, it doesn’t matter, you can also use the SSH command to open the Raspberry Pi’s Bash shell and then using the command to set up the VNC.

Have Temporarily Monitor (or TV)?
  1. Connect a monitor (or TV), mouse and keyboard to the Raspberry Pi and power it on. Select the menu according to the numbers in the figure.

    _images/mac_vnc1.png
  2. The following screen will be displayed. Set VNC to Enabled on the Interfaces tab, and click OK.

    _images/mac_vnc2.png
  3. A VNC icon appears on the upper right of the screen and the VNC server starts.

    _images/login1.png
  4. Open the VNC server window by clicking on the VNC icon, then click on the Menu button in the top right corner and select Options.

    _images/mac_vnc4.png
  5. You will be presented with the following screen where you can change the options.

    _images/mac_vnc5.png

    Set Encryption to Prefer off and Authentication to VNC password.

  6. When you click the OK button, the password input screen is displayed. You can use the same password as the Raspberry pi password or a different password, so enter it and click OK.

    _images/mac_vnc16.png

    You are now ready to connect from your Mac. It’s okay to disconnect the monitor.

From here, it will be the operation on the Mac side.

  1. Now, select Connect to Server from the Finder’s menu, which you can open by right-clicking.

    _images/mac_vnc10.png
  2. Type in vnc://<username>@<hostname>.local (or vnc://<username>@<IP address>). After entering, click Connect.

    _images/mac_vnc11.png
  3. You will be asked for a password, so please enter it.

    _images/mac_vnc12.png
  4. The desktop of the Raspberry pi will be displayed, and you will be able to operate it from the Mac as it is.

    _images/mac_vnc13.png
Don’t Have Temporarily Monitor (or TV)?
  • You can apply the SSH command to open the Raspberry Pi’s Bash shell.

  • Bash is the standard default shell for Linux.

  • The shell itself is a command (instruction) when the user uses Unix/Linux.

  • Most of what you need to do can be done through the shell.

  • After setting up the Raspberry pi side, you can access the desktop of the Raspberry Pi using the Finder from the Mac.

  1. Type ssh <username>@<hostname>.local to connect to the Raspberry Pi.

    ssh pi@raspberrypi.local
    
    _images/mac_vnc14.png
  2. The following message will be displayed only when you log in for the first time, so enter yes.

    The authenticity of host 'raspberrypi.local (2400:2410:2101:5800:635b:f0b6:2662:8cba)' can't be established.
    ED25519 key fingerprint is SHA256:oo7x3ZSgAo032wD1tE8eW0fFM/kmewIvRwkBys6XRwg.
    This key is not known by any other names
    Are you sure you want to continue connecting (yes/no/[fingerprint])?
    
  3. Enter the password for the Raspberry pi. The password you enter will not be displayed, so be careful not to make a mistake.

    pi@raspberrypi.local's password:
    Linux raspberrypi 5.15.61-v8+ #1579 SMP PREEMPT Fri Aug 26 11:16:44 BST 2022 aarch64
    
    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.
    
    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    Last login: Thu Sep 22 12:18:22 2022
    pi@raspberrypi:~ $
    
  4. Set up your Raspberry Pi so that you can log in via VNC from your Mac once you have successfully logged into it. The first step is to update your operating system by running the following commands.

    sudo apt update
    sudo apt upgrade
    

    Do you want to continue? [Y/n], Enter Y when prompted.

    It may take some time for the update to finish. (It depends on the amount of updates at that time.)

  5. Enter the following command to enable the VNC Server.

    sudo raspi-config
    
  6. The following screen will be displayed. Select 3 Interface Options with the arrow keys on the keyboard and press the Enter key.

    _images/image2821.png
  7. Then select P3 VNC.

    _images/image2881.png
  8. Use the arrow keys on the keyboard to select <Yes> -> <OK> -> <Finish> to complete the setup.

    _images/mac_vnc8.png
  9. Now that the VNC server has started, let’s change the settings for connecting from a Mac.

    To specify parameters for all programs for all user accounts on the computer, create /etc/vnc/config.d/common.custom.

    sudo nano /etc/vnc/config.d/common.custom
    

    After entering Authentication=VncAuthenter, press Ctrl+X -> Y -> Enter to save and exit.

    _images/mac_vnc15.png
  10. In addition, set a password for logging in via VNC from a Mac. You can use the same password as the Raspberry pi password or a different password.

    sudo vncpasswd -service
    
  11. Once the setup is complete, restart the Raspberry Pi to apply the changes.

    sudo sudo reboot
    
  12. Now, select Connect to Server from the Finder’s menu, which you can open by right-clicking.

    _images/mac_vnc10.png
  13. Type in vnc://<username>@<hostname>.local (or vnc://<username>@<IP address>). After entering, click Connect.

    _images/mac_vnc11.png
  14. You will be asked for a password, so please enter it.

    _images/mac_vnc12.png
  15. The desktop of the Raspberry pi will be displayed, and you will be able to operate it from the Mac as it is.

    _images/mac_vnc13.png

Windows Users

If you’re a Windows user, you can use Windows PowerShell to login Raspberry Pi remotely.

  1. Press the windows + R shortcut key in your keyboard to open the Run program. Then type powershell in the input box.

    _images/sp221221_135900.png
  2. Check if your Raspberry Pi is on the same network by type in ping <hostname>.local.

    ping raspberrypi.local
    
    _images/sp221221_145225.png
    • If terminal prompts Ping request could not find host <hostname>.local, it is possible that the Raspberry Pi failed to connect to the network.lease check the network.

    • If you really can’t ping <hostname>.local, try to Get the IP address and ping <IP address> instead. (e.g., ping 192.168.6.116)

    • If multiple prompts like “Reply from <IP address>: bytes=32 time<1ms TTL=64” appear, it means your computer can access the Raspberry Pi.

  3. Type in ssh <username>@<hostname>.local (or ssh <username>@<IP address>).

    ssh pi@raspberrypi.local
    
  4. The following message may appear.

    The authenticity of host 'raspberrypi.local (192.168.6.116)' can't be established.
    ECDSA key fingerprint is SHA256:7ggckKZ2EEgS76a557cddfxFNDOBBuzcJsgaqA/igz4.
    Are you sure you want to continue connecting (yes/no/[fingerprint])?
    

    Input "yes".

  5. Input the password you set before. (Mine is raspberry.)

    Note

    When you input the password, the characters do not display on window accordingly, which is normal. What you need is to input the correct password.

  6. We now get the Raspberry Pi connected and are ready to go to the next step.

    _images/sp221221_140628.png
Remote Desktop

If you’re not satisfied with using the command window to access your Raspberry Pi, you can also use the remote desktop feature to easily manage files on your Raspberry Pi using a GUI.

Here we use VNC® Viewer.

Enable VNC service

The VNC service has been installed in the system. By default, VNC is disabled. You need to enable it in config.

  1. Input the following command:

    sudo raspi-config
    
  2. Choose 3 Interfacing Options by press the down arrow key on your keyboard, then press the Enter key.

    _images/image2821.png
  3. Then P3 VNC.

    _images/image2881.png
  4. Use the arrow keys on the keyboard to select <Yes> -> <OK> -> <Finish> to complete the setup.

    _images/mac_vnc8.png

Login to VNC

  1. You need to download and install the VNC Viewer on personal computer.

  2. Open it once the installation is complete. Then, enter the host name or IP address and press Enter.

    _images/vnc_viewer1.png
  3. After entering your Raspberry Pi name and password, click OK.

    _images/vnc_viewer2.png
  4. Now you can see the desktop of the Raspberry Pi.

    _images/login1.png

Linux /Unix Users

  1. Go to Applications->Utilities, find the Terminal, and open it.

    _images/image21.png
  2. Check if your Raspberry Pi is on the same network by type in ping <hostname>.local.

    ping raspberrypi.local
    
    _images/mac-ping.png
    • If terminal prompts ping: cannot resolve <hostname>.local, it is possible that the Raspberry Pi failed to connect to the network. Please check the network.

    • If you really can’t ping <hostname>.local, try to Get the IP address and ping <IP address> instead. (e.g., ping 192.168.6.116)

    • If multiple prompts like 64 bytes from <IP address>: icmp_seq=0 ttl=64 time=0.464 ms appear, it means your computer can access the Raspberry Pi.

  3. Type in ssh <username>@<hostname>.local (or ssh <username>@<IP address>).

    ssh pi@raspberrypi.local
    
  4. The following message may appear.

    The authenticity of host 'raspberrypi.local (192.168.6.116)' can't be established.
    ECDSA key fingerprint is SHA256:7ggckKZ2EEgS76a557cddfxFNDOBBuzcJsgaqA/igz4.
    Are you sure you want to continue connecting (yes/no/[fingerprint])?
    

    Input "yes".

    _images/mac-ssh-login.png
  5. Input the password you set before. (Mine is raspberry.)

  6. We now get the Raspberry Pi connected and are ready to go to the nextstep.

    _images/mac-ssh-terminal.png

5. Set up the Pironman

Note

  • This Pironman is used in the same way as PC and requires the power button to power on/off.

Compatible Systems

Pironman compatible systems are shown below.

_images/compitable_system.png

If your systems that don’t have git, python3 and pip pre-installed you need to install them first.

sudo apt-get update
sudo apt-get install git -y
sudo apt-get install python3 python3-pip python3-setuptools -y

Install pironman module

Use the following commands to download and install the pironman module.

cd ~
git clone https://github.com/sunfounder/pironman.git -b v2.0
cd ~/pironman
sudo python3 install.py

Warning

The -b v2.0 in the directive is necessary

Rebooting is required after installation to take effect. A reboot reminder will pop up at some point, and you can select y to reboot now or at a later time.

Here are the basic configurations for Pironman.

  • The OLED screen will display the CPU, RAM and ROM Usage, CPU Temperature and IP Address of the Raspberry Pi.

  • After 60 seconds, the OLED display goes into sleep mode, and you can wake it up by a short press on the power button.

  • The fan is turned on at 50 degrees Celsius.

  • Turn on the WS2812 RGB strip(default connection in IO10) so that it displays in color #0a1aff(blue) and in breath mode (change rate is 50%).

  • At this point, you can press and hold for 2 seconds to safely shut down or 10 seconds to forcibly shut down.

Modify the Configuration

In the pironman module, we have some basic configurations for Pironman, and you can check them with the following command.

pironman -c

The current configurations are shown below.

  • The fan is turned on at 50 degrees Celsius.

  • The duration of the OLED display is 60s, after 60s it will start to sleep.

  • Turn on the WS2812 RGB strip(default 10) so that it displays in color #0a1aff and in breath mode (change rate is 50%).

_images/pironman_c.jpg

You can also modify these configurations to suit your needs.

Use pironman or pironman -h or pironman --help to view the instructions, as follows.

Usage:
    pironman <OPTION> <input>

Options:
    start            start pironman service

    stop             stop pironman service

    restart          restart pironman service

    -h,--help        help, show this help

    -c,--check       show all configurations

    -a,--auto        [ on ],enable auto-start at boot
                     [ off ], disable auto-start at boot

    -u,--unit        [ C/F ], set the unit of temperature,
                         C or F (Celsius/Fahrenheit)

    -f,--fan         [ temp ], Temperature at which the fan switches on,
                     in celsius (default 50),in range (30 ~ 80)

    -al,--always_on  [on/off], whether the screen is always on,
                     default False

    -s,--staty_time  [time], screen display duration in second,
                     in second, default 30

    -rw,--rgb_sw     [on/off], rgb strip switch

    -rs,--rgb_style  rgb strip display style, default: breath,
                     in [breath / leap / flow / raise_up / colorful]

    -rc,--rgb_color  [(HEX)color], set the color of rgb strip,
                     default: 0a1aff

    -rb,--rgb_speed  [speed], rgb blink speed (0 ~ 100, default 50)

    -pwm,--rgb_pwm   [frequency], rgb signal frequency (400 ~ 1600, default 1000 kHz)

    -rp,--rgb_pin    [pin], rgb signal pin, could be [10 / spi/ SPI / 12 / pwm/ PWM] or
                     [21 / pcm / PCM], default 10

For example, to turn off the automatic execution of programs at boot.

pironman -a off

Or reset the color of WS2812 RGB strip.

pironman -rc ff8a40

Those configurations are stored in /opt/pironman/config.txt, and you can also make changes directly in this file.

sudo nano /opt/pironman/config.txt
_images/pironman_config.jpg

Press Ctrl+X -> Y -> Enter to save and exit editing.

Note

The introduction and configuration of the Pironman components can be found in: 6. About Hardware.

6. About Hardware

This chapter is a detailed description of all the components in Pironman, as well as the associated software configuration.

Features

Functions

  • Raspberry Pi mini PC

  • Tower cooler can cool a 100% CPU load Pi to 39°C at 25°C room temperature

  • Onboard USB to M.2 SATA SSD, TRIM supported

  • IR Receiver for multi-media center like Kodi or Volumio

  • RGB Fan, with GPIO control

  • 16 WS2812 Addressable RGB LED light up the whole case with cool light effect

  • Retro metal power button with indicator light for safe shut down

  • 0.96” OLED Display showing Raspberry Pi’s CPU usage, temperature, disk usage, IP address, RAM usage etc.

  • External GPIO extender with pin name label, for easy access

  • Power status memory, remembers the power status incase accident power cut off

  • Re-wiring the microSD card for easy access

  • Aluminum main body with clear Acrylic side panel

Parameters

  1. Dimension: 112.45x68.2x118.92mm

  2. Material
    1. Main body: aluminum alloy

    2. Both sides and front panel: acrylic

  3. Support platform: Raspberry Pi 4B

  4. Power input: USB Type C 5V/3A

  5. Rated power: 5V/800mA

  6. interface (d ~ i is the original Raspberry Pi interface exposed)
    1. Raspberry Pi standard 40-Pin GPIO

    2. micro SD

    3. USB Type C power input

    4. USB 2.0 x 2

    5. USB 3.0

    6. Gigabit LAN port

    7. USB Type C Raspberry Pi power supply (direct power to Raspberry Pi, not recommended)

    8. micro HDMI x 2

    9. 3.5mm headphone jack

  7. Power button

  8. OLED screen: 0.96’’ 128x64 resolution

  9. Infrared receiver: 38KHz

  10. Cooling fan: size 40x40x10mm

  11. WS2812 RGB LED: 16xWS2812B-5050

Pin Functions

_images/pin_define.png
  • Shutdown Signal Pin: By pressing the power button, the Raspberry Pi will power off, while setting GPIO26 to a high level, and if the Main Board detects this high level, it will power cut.

Dimensional Drawing

_images/pironman_dimension.png

Main Board

About the Ports

_images/main_board_1.png

About the Pins

Note

Two channels of fan pins are provided, allowing you to assemble a fan in both the front and back of the Pironman at the same time.

_images/main_board_2.png

There are 5 jumper caps on the Main Board, each jumper cap corresponds to a function, if you do not need the function and want to use the pin elsewhere, you can unplug the jumper cap. The following is a detailed explanation of the functions of the five jumper caps.

  • Enable Power Button: If you pull out this jumper cap, the power button will not work. Besides, the power button is also used to wake up the OLED screen in Sleep Mode.

  • Shutdown Signal (IO26): The Main board powers on/off depending on the level of the State pin; when State is low, it powers on, and when State is high, it powers off.

    • You can only turn off the main board by pressing and holding the power button for 10 seconds if you connect GND and state with a jumper cap.

    • If you connect State and IO26 with a jumper cap, after configuration, the Raspberry Pi can control the State pin through IO26. When Raspberry Pi is on, State will be set to low level, when Raspberry Pi is off, State will be set to high level, so the motherboard and Raspberry Pi can power on/off synchronously.

  • WS2812 Pin Select: Raspberry Pi has three high-speed signal driving mode that can be used to drive WS2812 RGB LED strip. But these modes have other uses, and using them for WS2812 RGB LED strip will disable their original functions.

    • PCM (IO21) for digital audio (HDMI audio).

    • SPI (IO10) is used for SPI interface.

    • PWM (IO12) for analog audio (3.5mm audio jack).

    The SPI (IO10) drive mode is selected by default. If you switch to a different pin (let’s say IO21) during the assembly process, you will also need to modify the corresponding configuration.

    pironman -rp 21
    
  • Enable Fan: Insert the jumper to enable fan control; remove the jumper to turn off the fan.

  • Enable IR Receiver: If you pull out this jumper cap, the IR Receiver will not work.

Power Cut Memory

When the Pironman suddenly loses power, the chip of the Main Board will record this state and will automatically power on the next time.

OLED Screen

After installation, the script will start automatically and the OLED screen will display the CPU, RAM and ROM Usage, CPU Temperature and IP Address of the Raspberry Pi.

In order to extend the life of OLED screen, OLED will turn off after 60 seconds by default, and will light up by pressing the power button shortly. You can enable/disable this feature with the following command.

  • set to sleep mode:  “al” means to “always on”. In sleep mode, short press the power button to wake up.

pironman  -al off
  • set to always on mode:

pironman  -al on
  • Set the duration in seconds,

pironman  -s 60
  • The above are what we set for OLED screen, if you want to make OLED screen display other information and effects, you can open /opt/pironman/main.py to modify and run it.

    Open this python script and modify its contents.

    sudo nano /opt/pironman/main.py
    

    Press Ctrl+X -> Y -> Enter to save and exit editing.

    Run it.

    sudo python3 /opt/pironman/main.py
    

Cooling Fan

Note

The Cooling Fan  is connected to GPIO6 (BCM).

The working status of the Cooling Fan is decided by the CPU temperature. When the CPU temperature reaches the set threshold, the fan spins, and if it is 2 degrees Celsius below the threshold, the fan is stopped.

  • Set the temperature unit, C: Celsius, F: Fahrenheit.

pironman  -u C
  • Set the temperature at which the fan starts, for example, 40 degrees Celsius (the unit is set by you).

pironman  -f 40

WS2812 RGB Strip

Pin Selection

  1. Raspberry Pi has three high-speed signal driving mode that can be used to drive WS2812 RGB LED strip. But these modes have other uses, and using them for WS2812 RGB LED strip will disable their original functions.

    _images/strip_select.png
    • SPI (IO10) is used for SPI interface.

    • PWM (IO12) for analog audio (3.5mm audio jack).

    • PCM (IO21) for digital audio (HDMI audio).

  2. The SPI (IO10) drive mode is selected by default. If you switch to a different pin (let’s say IO21) during the assembly process, you will also need to modify the corresponding configuration.

    pironman -rp 21
    

Other Configurations

The WS1812 RGB Strip is a light strip with 8 RGB LEDs that can be used to display Pironman’s status. You can use commands to make it turn on or off, or to modify its color (default is blue), display mode and change rate.

  • Turn on the WS2812 RGB Strip.

pironman  -rw on
  • Turn it off.

pironman  -rw off
  • Change its color, using hexadecimal color values.

pironman  -rc fe1a1a
  • Changing the display mode, there are four modes to choose from: breath, leap, flow, raise_up.

pironman  -rs leap
  • Change the speed of change (0 ~ 100%).

pironman  -rb 80
  • Above are the effects we preset for WS2812 RGB Strip, if you want it to display other effects, you can open /opt/pironman/ws2812_RGB.py to modify and run it.

    Open this python script and modify its contents.

    sudo nano /opt/pironman/ws2812_RGB.py
    

    Press Ctrl+X -> Y -> Enter to save and exit editing.

    Run it.

    sudo python3 /opt/pironman/ws2812_RGB.py
    

Power Button

Note

The power button is connected to GPIO26, if you want to change it to another pin, please refer to Compatible Systems.

The power button can be used to wake up the OLED screen or to turn the Pironman off.

  • Upon power-up, the OLED screen displays for 60 seconds before going into sleep mode. Using the power button, you can wake up the OLED screen again later.

  • You have 2 ways to get the Pironman to shut down.

    1. Force Shutdown

      Pressing and holding the power button for 10 seconds will let the Pironman power cut, but this method may damage the Raspberry Pi’s files or leave some changes unsaved.

    2. Safe Shutdown

      There is also a way to safely turn off the Pironman by pressing and holding the power button for 2 seconds after configuring it.

IR Receiver

Note

The IR receiver is connected to GPIO13, if you want to change it to another pin, please refer to Compatible Systems.

Before you can use IR receiver, you need to test its connection and install the relevant module.

  1. Use the following command to test, if there is a display device then the configuration is successful.

    sudo ls /dev |grep lirc
    
  2. Install the lirc module.

    sudo apt-get install lirc -y
    
  3. Run the following command, and if you press a key on the remote controller, the code of the corresponding key will be printed.

    mode2 -d /dev/lirc0
    

Note

If you want to play Kodi on Raspberry Pi, please refer to: Install Kodi on Raspberry Pi Use OSMC.

SATA M.2 SSD

Why not compitable with NVME M.2 SSD?

Note

The M.2 SSD hard drive interface only supports SATA protocol, not NVME/PCIe.

Our current interface is designed to support SATA M.2 SSDs, and we want to clarify our decision to not offer compatibility with NVMe M.2 SSDs:

The primary factor is that while NVMe SSDs excel in high-performance computing environments, the Raspberry Pi 4’s processing capacity and bus bandwidth are limited. This means that even if an NVMe SSD is connected, hardware constraints could prevent it from fully utilizing the SSD’s performance advantages, resulting in suboptimal resource utilization.

Furthermore, the USB power supply on the Raspberry Pi 4 has limitations. Connecting an NVMe SSD might lead to insufficient power supply, especially under heavy workloads. NVMe SSDs often require higher currents for stable performance, but the Raspberry Pi 4’s USB ports might not meet these power demands, leading to unstable SSD operation or even failure to function properly.

Due to these reasons, connecting an NVMe SSD wouldn’t yield significant performance improvements. This is why we have chosen not to support the NVMe SSD interface.

We appreciate your understanding of our design considerations. Our commitment is to provide you with a product that effectively meets your needs while delivering a seamless experience.

About the Model

M.2 SSD (M.2 solid-state drive) comes in various models, depending on their specifications and performance characteristics. Here are some common M.2 SSD models:

  • M.2 SATA SSDs: These use the SATA interface, similar to 2.5-inch SATA SSDs but in the smaller M.2 form factor. They are limited by the SATA III maximum speeds of around 600 MB/s. These SSDs are compatible with M.2 slots keyed for B and M keys.

  • M.2 NVMe SSDs: These SSDs use the NVMe protocol over PCIe lanes and are significantly faster than M.2 SATA SSDs. They are suitable for applications requiring high read/write speeds like gaming, video editing, and data-intensive tasks. These SSDs typically require M-keyed slots. These drives utilize the PCIe (Peripheral Component Interconnect Express) interface, with different versions like 3.0, 4.0, and 5.0. Each new version of PCIe effectively doubles the data transfer speed of its predecessor.

M.2 SSDs come in three key types: B key, M key, and B+M key. However, later on, the B+M key was introduced, combining the functionalities of the B key and M key. As a result, it replaced the standalone B key. Please refer to the image below.

_images/ssd_key.png

In general, M.2 SATA SSDs are B+M-keyed (can fit in sockets for B-keyed and M-keyed modules), while M.2 NVMe SSDs for PCIe 3.0 x4 lane are M-keyed.

_images/ssd_model2.png

About the Length

M.2 modules come in different sizes and can also be utilized for Wi-Fi, WWAN, Bluetooth, GPS, and NFC.

Pironman supports four M.2 SATA SSD sizes based on their names: 2230, 2242, 2260, and 2280. The “22” is the width in millimeters (mm), and the two following numbers are the length. The longer the drive, the more NAND flash chips can be mounted; therefore, the more capacity.

_images/m2_ssd_size.png

Assemble the SSD

  1. Take off the base plate of the Pironman.

    _images/ssd1.jpg
  2. Remove the screw for the M.2 SATA SSD.

    _images/ssd2.jpg
  3. Insert your M.2 SATA SSD.

    _images/ssd3.jpg
  4. Screwed in place.

    _images/ssd4.jpg
  5. Put the base plate back on.

    _images/ssd5.jpg
  6. Plug in SSD Bridge and 5V/3V power supply.

    _images/ssd18.jpg

Booting from SSD

Now that you’ve installed the SSD on your Raspberry Pi, let’s explore how to install the Raspberry Pi OS on it and configure the Raspberry Pi to boot from the SSD.

1. Install Raspberry Pi OS to SSD

There are two methods to install Raspberry Pi OS on your SSD:

  • The first method is to directly install it via the Raspberry Pi Imager. This method is similar to installing the OS on a Micro SD card. Just select your SSD when you’re prompted to choose a storage device. If you’re unfamiliar with this process, you can refer to the tutorial 3. Installing the OS (Common).

  • The alternative method is copying from your existing SD card. If you want to retain the files and system on your SD card, this method is for you.

Let’s walk through how you can copy the contents of your Micro SD to the SSD:

  1. Insert the micro SD card into the Pironman, plug in the USB Bridge to connect the SSD to the Raspberry Pi, and power the pironman up.

    _images/ssd18.jpg
  2. Access the Raspberry Pi desktop. You can do this by connecting a monitor directly or through remote desktop, see the tutorial for guidance: If You Have No Screen.

  3. Launch the SD Card Copier from the Accessories section of the start menu.

    _images/sd_card_copy.png
  4. Choose the Copy from device (Micro SD card) and the copy to device (SSD, /dev/sda/). Double-check to ensure you’ve selected the correct drives, then click “Start” to initiate the copying process. This can take around several minutes.

    _images/sd_card_copy_select.png
  5. Once you see “Copy Complete”, shut down the Raspberry Pi and remove the micro SD card.

Note

If your Micro SD card is the the Raspberry Pi Lite, you’ll need to use commands to complete the copying process. For detailed instructions, please refer to: How to copy Raspberry Pi OS Lite from Micro SD to SSD?.

2. Install Bootloader

With the Raspberry Pi OS now on the SSD, it’s time to reset the Pi’s Bootloader to prioritize booting from USB.

  1. Download and install the Raspberry Pi Imager from the Raspberry Pi website.

  2. Insert a spare micro SD card into your computer. Please be aware that the contents of this card will be erased, so back up any important data first.

  3. Launch the Raspberry Pi Imager and scroll down under “Operating System” to “Misc Utility Images”. Left-click to access the subsequent menu.

    _images/ssd6.png
  4. Select Bootloader.

    _images/ssd7.png
  5. Next, choose USB Boot. This will bring us back to the main menu.

    _images/ssd8.png
  6. Under “Storage”, select the micro SD card. Double-check to ensure you’ve chosen the correct drive before proceeding.

    _images/ssd88.png
  7. Click “WRITE” to download the configuration image and write it to the micro SD card.

    _images/ssd9.png
  8. Wait for a successful write confirmation before removing the micro SD card from your computer.

  9. Insert the micro SD card into the Pironman and power it up.

    _images/connect_power1.jpg
  10. Once the update is complete, the green activity LED will flash steadily. If you have an HDMI monitor connected, the screen will turn green upon completion. The update might take 10 seconds or even longer, so ensure you don’t remove the micro SD card during this process.

    _images/ssd10.jpg
  11. Turn off the Raspberry Pi’s power and remove the micro SD card.

3. Boot from SSD

  1. At this point, ensure the micro SD card is removed. Connect the USB Bridge to connect the SSD to the Raspberry Pi. Now, power up the Pironman.

    _images/login1.png

7. Appendix

Install Kodi on Raspberry Pi Use OSMC

Kodi is one of the most popular ways to play media on your Raspberry Pi. It supports a large number of different media formats, and you can use this media center software to play music, videos, and even show your images.

With Kodi, you can scan and sort all your media files. It will download information about your files and present it to you in an attractive manner.

You can install Kodi directly on your Raspberry Pi system, or you can just use a distribution with Kodi pre-installed, such as OSMC and LibreELEC.

In this tutorial, we will show you how to install and set up OSMC Media Center.

_images/kodi0.png

OSMC is an operating system distribution that uses Kodi media center software.

One of the advantages of OSMC is that it is actively maintained and built on top of a full operating system, allowing it to be easily extended beyond its built-in Kodi functionality. For example, we can easily set up Netflix on it because we can easily access the backend.

For the best experience with Kodi, we recommend that you use the Raspberry Pi 4 or newer. The stronger processor and increased RAM will help Kodi run at its best.

Components List

Required

  • Pironman

  • Micro SD card (8GB+)

  • Ethernet cable or Wi-Fi

  • HDMI cable

  • Monitor

  • Keyboard and mouse

Optional

  • M.2 SATA SSD

Install the OSMC Image

You will learn how to install OSMC image on a Micro SD card in this section. Traditionally, burning tools used to be Etcher and Win32 disk imager, but Raspberry Pi has now developed Raspberry Pi Imager, which is an all-in-one image and tool that makes image installation easy.

  1. If you don’t have Raspberry Pi Imager, please download it.

  2. Open Raspberry Pi Imager, and click CHOOSE OS.

    _images/kodi1.png
  3. Click the Media player OS button. This button will bring up 2 images for Kodi.

    _images/kodi2.png
  4. Here we choose OSMC.

    _images/kodi6.png
  5. Raspberry Pi 0/1, 2/3, 4/400 versions are provided; please select the appropriate version.

    _images/kodi7.png
  6. After selecting the appropriate drive, then click Write.

    _images/kodi8.png
  7. Once the installation success message appears, you can pull out the Micro SD.

    _images/kodi9.png

Initial Setup of OSMC on the Raspberry Pi

Now that we have installed OSMC to an SD card, we will walk you through the process of its initial set up process.

  1. Now pull out the Micro SD card and insert it into the card slot of the Piron.

    _images/connect_power.jpg
  2. Connect your display to the Pironman with the HDMI cable, then turn it on with the power switch.

  3. You will be greeted with the following screen when you launch OSMC for the first time. Please wait until the setup process is complete before continuing with our OSMC setup guide.

    _images/kodi10.png
  4. Once the installation is complete, you will need to reboot Pironman. You can reboot by long pressing the power switch or by re-plugging the power cable.

  5. The configuration page will appear once you have rebooted, and it will ask you to select the language. Select Yes to continue the setup after selecting a language for OSMC.

    _images/kodi11.png
  6. Next, you will be asked to select the time zone. Make sure to select the relevant time zone where you live, as this will help ensure that the time is correct.

    _images/kodi12.png
  7. You will be asked if you would like to rename your device here. Default device name is osmc and it is recommended to change to another name.

    _images/kodi13.png
  8. You can disable or enable the SSH service in this section. OSMC’s setup tool will enable SSH by default. Click Accept to continue the installation.

    _images/kodi14.png
  9. In this step, you will be asked to agree to OSMC’s and Kodi’s terms of service. Please select the Continue option after reading the license and agreeing to it.

    _images/kodi15.png
  10. Select a theme of your choice. For this guide, we will use the default OSMC theme.

    _images/kodi19.png
  11. Now you will be asked if you want to sign up for OSMC’s newsletter. For this guide, we will continue using the No thanks option.

    _images/kodi20.png
  12. At this point, you have now finally completed the initial configuration process of OSMC on your Raspberry Pi. You can take yourself to the Kodi main screen by selecting the Exit option.

    _images/kodi21.png

Configuring Network in OSMC

In this section, we will show you how to configure the network for your device using the OSMC interface.

  1. Go to the Settings option.

    _images/kodi22.png
  2. Then go to the My OSMC menu.

    _images/kodi16.png
  3. Select Network. This menu also contains several other options that can help you configure OSMC on your Raspberry Pi.

    _images/kodi17.png
  4. You can configure WIFI in this option, or just plug in a network cable, after which you will see information about the connection and remember this IP address, which you will need to access OSMC remotely later in the guide.

    _images/kodi24.png

Files Transfer

Sometimes you may need to transfer files between your OSMC device and your computer in order to edit, add, or change files that already exist. Depending on your previous experience, there are many ways to transfer files. Some of these methods work right out of the box (if SSH is enabled). Some methods require additional OSMC features, such as a Samba (SMB) server or an FTP server.

SFTP

For the sake of simplicity, we will focus only on SFTP using FileZilla, since it works out of the box on all three platforms (Windows, macOS, and Linux) with no additional changes to OSMC (required the SSH has been enabled).

When you open FileZilla for the first time, you will not connect to anything, you will need to provide the host, username and password.

  • Host: sftp://ip-address-of-your-osmc

  • User name: osmc

  • Password: osmc (or the password specified by your user)

  • Port: can be left blank to use the default SSH port 22

Once you have entered these, simply click the Quick Connect button to establish a connection.

_images/kodi37.png

Samba Server

You can also transfer files using SMB server, which is a more intuitive and useful way. But you need to go to OSMC and install this server first, as follows.

  1. Go to the My OSMC menu page and select the App Store icon.

    _images/kodi28.png
  2. Select Samba (SMB) Server.

    _images/kodi29.png
  3. Select Install.

    _images/kodi30.png
  4. Select Apply to start the SMB server installation.

    _images/kodi31.png
  5. A popup will appear in the upper right corner to prompt you to install. Once the installation is complete, you will be able to access your Raspberry Pi files from your own computer.

    _images/kodi32.png
  6. On Windows, use Win+R to open Run Box.

    _images/kodi33.png
  7. Type \\ip address in the input box.

    _images/kodi34.png
  8. Now you will see a shared drive called osmc.

    _images/kodi35.png
  9. Once you click in, you will see different folders and now you can transfer your music, videos or movies to them.

    _images/kodi36.png

Adding OSMC’s videos to Scrape

In this section, we will show you how to add a video folder for OSMC to scrape.

Scrapping video is a fairly simple process and is one of the main features of Kodi.

  1. First, we need to go to the Video menu.

    _images/kodi45.png
  2. Next, we need to select the Files submenu. This submenu will allow you to browse through the imported folders or add additional folders.

    _images/kodi38.png
  3. Next, select the Add video.. option. In this option, we will add folders for OSMC’s Kodi to scan into its library.

    _images/kodi39.png
  4. In this menu, you need to select the Browse or Add option.

    _images/kodi40.png
    • The Browse option will allow you to find folders via OSMC’s file browser.

    • Add option will allow you to manually input the path to the directory.

    • Whichever route you take, choose the folder where your TV shows and movies are stored, then click OK.

    • Make sure you separate movies and TV shows in separate folders.

    • This is because if they are contained in the same folder, Kodi’s scrapers will not be able to distinguish between them.

      _images/kodi41.png
  5. OSMC divides videos into three separate categories, Movies, Music Videos and TV Shows. Select the option that is most relevant to your video. The options you select will affect how OSMC obtains information from the video.

    _images/kodi43.png
  6. After selecting the type of media the catalog contains, you can now select OK. OSMC will automatically select a known good information provider that will be used to scrape your library.

    _images/kodi44.png

    OSMC will scan your video and search for its name in a database on the Internet. This scan allows it to retrieve posters, actors, messages and other interesting information about your video.

    After selecting Ok, the scrape process should start automatically. You should begin to see that your movie or TV show has been added to the OSMC interface

Configure a remote

A 38KHz IR receiver is built into the Pironman and is connected to the GPIO13 pin, so you can use the remote control to control your Kodi.

1. Configure IR receiver

  1. Go to the Settings -> My OSMC menu and select the Raspberry Pi icon.

    _images/kodi23.png
  2. Select Hardware Support, and add the pin number to 13 in gpio_pin.

    _images/kodi25.png

    Once set, you will be prompted to reboot to make this configuration effective.

2. Select a remote control

  1. Kodi supports many different remotes and you can follow the instructions to configure them. Now go back to the My OSMC menu and select the Remotes icon to go to the configuration page.

    _images/kodi26.png
  2. Choose the brand of remote you are using from the list.

    _images/kodi27.png

Kodi can now be controlled with your remote.

For more information, please refer to: https://osmc.tv/wiki/.

3. Manually add a remote

Manually configuring a remote is a way to get your .conf file that fits your remote, add it to the Remotes list, and select it as the one to use at this time.

i. Logging in via SSH

Now log in to the OSMC system remotely from your PC, the default name and password are osmc.

Windows users can download an SSH client called PuTTY here.

As an alternative, some Windows 10 installations provide access to a command line SSH client via “PowerShell” from the Windows Start Menu. If your Windows 10 system supports this, you can use the Linux instructions.

Linux and OS X users should have an SSH client already

You can find your device’s IP address in Settings -> Systems -> Network.

  • Windows

Run PuTTY and enter the IP address of your device and click OK. When prompted, enter osmc for both username and password.

_images/kodi_remote1.png
  • Linux / OS X

Open a Terminal interface and run the following command:

ssh osmc@<ip address of your device>

You will be prompted to accept the SSH key if this is the first time you have connected to the device. Type yes.

ii. Create an LIRC configuration file

  1. Make sure you have set gpio_pin to 13 in OSMC via Settings -> My OSMC -> Raspberry Pi -> Hardware Support.

    _images/kodi25.png
  2. In the terminal, check if the Raspberry Pi detects your IR receiver with the following command.

    ls /dev/lirc*
    

    A port message like /dev/lirc0 should appear.

  3. Now to see if you can receive data from the remote.

    sudo mode2 --driver default --device /dev/lirc0
    
  4. Then press the button on the remote and see if a string of pulse data appears.

    osmc@osmc:/etc/lirc$ sudo mode2 --driver default --device /dev/lirc0
    Using driver default on device /dev/lirc0
    Trying device: /dev/lirc0
    Using device: /dev/lirc0
    Running as regular user osmc
    space 16777215
    pulse 9083
    space 4442
    pulse 628
    space 509
    pulse 626
    space 508
    pulse 596
    space 543
    pulse 593
    space 538
    
  5. Now stop lircd.

    sudo killall lircd
    
  6. Get all available KEY_codes to match them later.

    irrecord --list-namespace
    
  7. Now create a .conf configuration file that fits your remote.

    irrecord -d /dev/lirc0
    
    • All you need to do is to run the above command.

    • Press the Enter key twice.

    • Name the remote control

    • Press and hold a key to sample until Please enter the name .. appears. .

    • Refer to the previous command to define all the keys.

    _images/kodi_remote.png
    • After configuring all the keys on the remote, press Enter to exit. You can use the ls command to see if the .conf file you configured exists.

  8. Now go back to OSMC and click Settings -> My OSMC -> Remotes.

    _images/kodi_remote2.png
  9. Select the .conf file under your Home folder by Browse.

    _images/kodi_remote4.png
  10. Once selected, press OK to select and then confirm your change.

    _images/kodi_remote3.png

At this point you can use your remote to control OSMC.

Get the IP address

There are many ways to know the IP address, and two of them are listed as follows.

Checking via the router

If you have permission to log in the router(such as a home network), you can check the addresses assigned to Raspberry Pi on the admin interface of router.

The default hostname of the Raspberry Pi OS is raspberrypi, and you need to find it. (If you are using ArchLinuxARM system, please find alarmpi.)

Network Segment Scanning

You can also use network scanning to look up the IP address of Raspberry Pi. You can apply the software, Advanced IP scanner and so on.

Scan the IP range set, and the name of all connected devices will be displayed. Similarly, the default hostname of the Raspberry Pi OS is raspberrypi, if you haven’t modified it.

Home Assistant

This section will guide you in installing the Home Assistant operating system on your Raspberry Pi. Please note that this process will result in the loss of all existing content on your Raspberry Pi system. It is important to backup your data before proceeding.

Install the HassOS

Step 1

Raspberry Pi have developed a graphical SD card writing tool that works on Mac OS, Ubuntu 18.04 and Windows, and is the easiest option for most users as it will download the image and install it automatically to the SD card.

Visit the download page: https://www.raspberrypi.org/software/. Click on the link for the Raspberry Pi Imager that matches your operating system, when the download finishes, click it to launch the installer.

_images/image11.png

Step 2

When you launch the installer, your operating system may try to block you from running it. For example, on Windows I receive the following message:

If this pops up, click on More info and then Run anyway, then follow the instructions to install the Raspberry Pi Imager.

_images/image12.png

Step 3

Insert your SD card into the computer or laptop SD card slot.

Step 4

In the Raspberry Pi Imager, select the OS that you want to install and the SD card you would like to install it on.

_images/sp230627_181014.png _images/sp230627_181052.png _images/sp230627_181112.png _images/sp230627_181306.png

Step 5

Select the SD card you are using.

_images/image14.png

Step 7

Click the WRITE button.

_images/sp230627_181444.png

Step 8

If your SD card currently has any files on it, you may wish to back up these files first to prevent you from permanently losing them. If there is no file to be backed up, click Yes.

_images/image18.png

Step 9

After waiting for a period of time, the following window will appear to represent the completion of writing.

_images/sp230628_161104.png

Setup Your Home Assistant

Step1

This step is about enabling the I2C interface to start the Pironman OLED.

Open File Explorer and access the SD card named Hassio-boot

_images/sp230628_095957.png

Create a new folder named CONFIG in the root partition.

_images/sp230628_100453.png

Inside the CONFIG folder, create a folder named modules.

_images/sp230628_101108.png

Enable file extension display.

_images/sp230628_101216.png

Create a text file inside the modules folder and rename it to rpi-i2c.conf . You will be prompted to confirm the extension change, select “Yes”.

_images/sp230628_101545.png

Open rpi-i2c.conf with Notepad and add the following content:

i2c-dev

Save and close the file.

Step2

This step involves configuring the RGB LED.

  1. Open the file named config.txt in the Hassio-boot directory.

    _images/sp230628_102441.png
  2. Add the following content at the bottom:

    dtparam=i2c_vc=on
    dtparam=i2c_arm=on
    dtoverlay=gpio-poweroff,gpio_pin=26,active_low=0
    dtoverlay=gpio-ir,gpio_pin=13
    
  3. It’s crucial to identify which pin you’re using to drive the WS2812 LED strip.

    _images/strip_select.png
    • If you’re using the default SPI pin (GPIO10), you need to add the following commands to the config.txt file to enable SPI and set the frequency to 500bps.

      dtparam=spi=on
      core_freq=500
      core_freq_min=500
      # Enable audio if you need it.
      dtparam=audio=on
      
    • If you’re using PWM (GPIO12), which is also used for audio output, you must disable the audio. Insert the following command into the config.txt file:

      dtparam=audio=off
      
    • For those using PCM (GPIO21), there’s no extra setup. But remember, it might conflict with I2S devices like hifiberry-dac or i2s-mmap. Ensure these are disabled and turn on audio if necessary.

      # Enable audio if you need it.
      dtparam=audio=on
      # Comment out the i2s device.
      # dtoverlay=hifiberry-dac
      # dtoverlay=i2s-mmap
      
  4. Finally, save and close this file.

Step3

Next, we will configure WiFi for Pironman.

Note

If you intend to use a wired connection for network access, you can skip this step.

Create a folder named network inside the CONFIG folder.

_images/sp230628_113426.png

Inside the network folder, create a new text file named my-network (without extension).

_images/sp230628_113506.png

In the my-network file, write the following text, replacing MY_SSID and MY_WLAN_SECRET_KEY with your own network’s SSID and password:

[connection]
id=my-network
uuid=72111c67-4a5d-4d5c-925e-f8ee26efb3c3
type=802-11-wireless

[802-11-wireless]
mode=infrastructure
ssid=MY_SSID
# Uncomment below if your SSID is not broadcasted
#hidden=true

[802-11-wireless-security]
auth-alg=open
key-mgmt=wpa-psk
psk=MY_WLAN_SECRET_KEY

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=auto

Save and exit the file.

Step4

Remove the microSD card from your computer and insert it into the Raspberry Pi. Then, connect the power (and Ethernet cable if needed).

Go back to your computer and navigate to homeassistant.local:8123 , or if that doesn’t work, you can find the IP address by checking your router.

During the first use of Home Assistant, you may need to wait for some time as it performs initial setup.

_images/sp230628_141749.png

Step5

Next, you will be prompted to create the first account.

_images/sp230627_135949.png

The system will prompt you to install some detected devices, but for now, you can skip this by clicking FINISH.

_images/sp230627_141016.png

Step6

Now we will install the Pironman addon for Home Assistant.

Please click the button below to quickly add it. Then proceed to step7 .

Open your Home Assistant instance and show the dashboard of a Supervisor add-on.

Alternatively, follow the steps below to install manually:

  1. In Home Assistant, navigate to Settings -> Addons.

    _images/sp230628_150312.png
  2. Click the “Addon Store” button in the lower right corner.

    _images/sp230628_150338.png
  3. Click the menu button in the top right corner and select “Repositories”.

    _images/sp230627_145728.png
  4. Type the repository URL: https://github.com/sunfounder/home-assistant-addon , and click Add. After adding the SunFounder repository, close the popup window.

    _images/sp230627_150423.png
  5. Click the menu button again, and click “Check for updates”.

    _images/sp230627_150716.png
  6. After a few seconds, the Pironman addon will appear at the end of the addon store. If not, try refreshing the page.

    _images/sp230627_150717.png

Step7

Enter the Pironman addon and click Install. This process may take a few minutes.

_images/sp230627_150840.png

Currently, you need to disable protection mode to allow the addon to access hardware information. Find “Protection Mode” and turn it off. Then, start (or restart) the addon.

_images/sp230627_153858.png

At this point, you should see the Pironman’s lighting effect and the OLED display light up. This indicates that the configuration is complete.

Troubleshooting

If your OLED or RGB strip fails to start properly, please go to the “Log” page.

_images/sp230628_162143.png
[DEBUG] oled init failed:
[Errno 2] No such file or directory
Cannot open /dev/spidev0.0. spi_bcm2835 module not loaded?
[DEBUG] rgb_strip init failed:
ws2811_init failed with code -13 (Unable to initialize SPI)

If you see the above logs, it means the configuration was not successful. Please follow the steps below:

  1. First, shut down Home Assistant.

    Warning

    If you force power off, it may damage HassOS. Follow the shutdown steps below:

    _images/sp230628_162821.png _images/sp230628_162906.png

    Then, wait for one minute before unplugging the power.

  2. Repeat Step 1 and Step 2 of this section (Setup Your Home Assistant) .

  3. Insert the SD card back into Pironman, connect the power, and wait for a minute or two. Then, in your browser, navigate to http://homeassistant.local:8123/ . Click on START in the Pironman Addon.

    Open your Home Assistant instance and show the dashboard of a Supervisor add-on.
  4. Wait for a moment, and you should see the Pironman (RGB strip & OLED) light up.

Addon Configuration

You can customize the Pironman effects on the Configuration page.

_images/sp230628_164931.png

Here, you can modify:

  • The temperature display unit on the OLED.

  • The duration of the OLED screen brightness.

  • The temperature at which the fan will start working.

  • The color and blinking mode of the RGB strip.

After making the desired changes, click “SAVE” to apply the settings.

FAQ

Pironman’s LED lights up but Raspberry Pi won’t boot when power button is pressed?

Please check the following conditions.

  1. Is there a separate power supply for the Raspberry Pi?

    Please do not do this, for the following reasons.

    Since the Raspberry Pi itself has no on/off control, it can only be powered on by powering up the Raspberry Pi. So Pironman will power off the Raspberry Pi after it is turned off, and power on the Raspberry Pi to start the Raspberry Pi. If you power on both the Raspberry Pi and Pironman, after shutdown, the Pironman has no way to start the Raspberry Pi by powering on the Raspberry Pi because the Raspberry Pi is externally plugged in and always powered on.

  2. Is the Micro SD card already inserted into the Pironman slot?

  3. Are there any systems installed on Micro SD card?

  4. The most important point to note is that the FFC cable of the GPIO Bridge is connected correctly?

    _images/gpio_bridge1.gif _images/gpio_bridge2.gif

How to copy Raspberry Pi OS Lite from Micro SD to SSD?

  1. Updating the Bootloader

    sudo apt update
    sudo apt full-upgrade
    sudo rpi-update
    sudo rpi-eeprom-update -d -a
    

    After setting, reboot to take effect.

  2. Use the following command to view the name of the storage device.

    sudo fdisk -l
    
  3. You will see a list of all the drives connected to your Raspberry Pi. In most cases, /dev/mmcxxx refers to your Micro SD card, and /dev/sda/ refers to your SSD.

    _images/ssd16.png
  4. Now, use the following command to clone the system from the Micro SD card to the SATA M.2 SSD.

    Note

    Replace /dev/mmcblk0 with the name of your Micro SD card, and also modify /dev/sda to match the name of your SSD if it has a different name.

    sudo dd if=/dev/mmcblk0 of=/dev/sda bs=4M
    
  5. Pull out the Micro SD card, connect the M.2 SATA SSD and then power on the Pironman.

Copyright Notice

All contents including but not limited to texts, images, and code in this manual are owned by the SunFounder Company. You should only use it for personal study,investigation, enjoyment, or other non-commercial or nonprofit purposes, under therelated regulations and copyrights laws, without infringing the legal rights of the author and relevant right holders. For any individual or organization that uses these for commercial profit without permission, the Company reserves the right to take legal action.