Easy to follow tutorial to install & initially configure DietPi
In this hot summer I can’t survive without “doing nothing”, so since my parents are on vacation for one month, I started a new easy project to give my parents a …
Setting up Diet Pi
Booting DietPi Linux from an external SSD on a Raspberry Pi 4B for faster performance. Install using backup images to preserve an existing /home partition.
Whether you’re getting started with electronics, want to prototype projects more quickly, or just want to use Ruby for something different, a single board computer (SBC) is a great choice. In this post, we’ll set up Ruby on an Orange Pi Zero 2W, then install the lgpio gem to use its GPIO, I2C, and SPI interfaces. Orange Pi Zero 2W ~ $21 USD (1GB version) Quad-core, 1.5 GHz, ARM Cortex-A53 processor 1 / 1.5 / 2 / 4 GB RAM versions available Built-in Wi-Fi and Bluetooth 40-pin GPIO header, including 3x I2C and 1x SPI Official (Debian) and DietPi Linux images available User Manual Step 1: Install DietPi Orange Pi has an official image for this board, but DietPi is more up to date and less bloated, so we’ll use that instead. Download the DietPi image for the Orange Pi Zero 2W Downlaod balena Etcher Flash the image onto your microSD card using Etcher Remove and reinsert the card, so it mounts as an external drive On the card, in dietpi.txt: Set AUTO_SETUP_NET_WIFI_ENABLED to 1 In dietpi-wifi.txt: Set aWIFI_SSID[0] to your Wi-Fi network name Set aWIFI_KEY[0] to your Wi-Fi network password Insert the microSD card into the Zero 2W and connect power Find its IP address on your local network (Angry IP Scanner) For initial setup, connect as root: ssh root@<IP_ADDRESS_OF_YOUR_PI> Password: dietpi Follow the instructions to complete initial setup, selecting avahi-daemon for auto installation. You may disable the Serial/UART device when prompted. Disconnect from this SSH session For the remaining steps, connect with: ssh dietpi@DietPi.local or ssh dietpi@<IP_ADDRESS_OF_YOUR_PI> For more information, see the official DietPi installation guide. Step 2: Install Ruby sudo apt install ruby ruby-dev build-essential Step 3: Install LGPIO C Library sudo apt install swig python3-dev python3-setuptools wget https://github.com/vickash/lg/archive/refs/heads/master.zip unzip master.zip cd lg-master make sudo make install Step 4: Install lgpio Gem sudo gem install lgpio Step 5: Enable I2C and
If you know what you're doing, it's not so hard