Home > Raspberry Pi Operating System
- Raspberry Pi Operating System
- Base Operating System
- GitHub
- PyCharm
- I2C Interface
- Raspberry Pi Video Camera
- VNC
Raspberry Pi Operating System
Raspberry Pi now provides a 64-bit Debian-based operating system (OS) via the Raspberry Pi Imager. The OS is quite good, though for some uses Ubuntu seems to work equally well if not better.
Base Operating System
- Install and start the Raspberry Pi Imager.
- Select the latest 64-bit Raspberry Pi image and write the image to the micro-SD card. Be sure to configure WiFi and SSH services on the image if needed.
- Boot the Raspberry Pi on the micro-SD card and log in.
- Upgrade and install a few dependencies, general tools, and applications:
sudo apt update sudo apt upgrade sudo apt install emacs apache2 sudo systemctl reboot
The Pi should reboot. Log in.
- If you’re planning to use OctoPrint for 3D printing, also install the following packages:
sudo apt install libjpeg62-turbo-dev imagemagick ffmpeg libv4l-dev cmake libgphoto2-dev libopencv-dev libsdl1.2-dev libprotobuf-c-dev v4l-utils
GitHub
- Run
ssh-keygen
and upload the content of~/.ssh/id_rsa.pub
to GitHub. - Clone the raspberry-py repository with
git clone git@github.com:MatthewGerber/raspberry-py.git
.
PyCharm
- Download the community version here. Be sure to download the Linux ARM distribution, which is required for the Pi.
- Extract the archive and move the extracted directory to
/opt/
- Add the PyCharm
bin
directory to yourPATH
in~/.bashrc
. - Start PyCharm and open the raspberry-py repository.
I2C Interface
- Run
raspi-config
and enable the I2C interface. - Run
i2cdetect -y 1
to confirm. A blank I2C readout will be displayed if no I2C peripherals are connected.
Raspberry Pi Video Camera
- Modify boot config:
sudo emacs /boot/firmware/config.txt
and addstart_x=1
andgpu_mem=256
at the end. - Enable camera: Run
raspi-config
and enable the camera. - Restart:
sudo shutdown -r now
- Test:
raspistill -o test.jpg
VNC
Run raspi-config
and enable VNC under interface options. Then open an SSH tunnel to the Pi:
ssh -L 59000:localhost:5900 -l USER IP
In the above, USER
is a local account on the Pi, and IP
is the address of the Pi. Finally, open a VNC client on your
remote machine (e.g., RealVNC) and open a connection to localhost:59000
. Log in with the local account on the Pi.