-
Notifications
You must be signed in to change notification settings - Fork 0
How to install
- Get a fresh Raspberry Pi and install it
- Install the script on it
The script will run by itself when the Raspberry Pi boots.
Follow the steps below for a full install on a Raspberry Pi from a laptop (headless). If you can plug a keyboard, mouse and screen on the Raspberry Pi, it is much simpler. I assume here that you have no specific knowledge on how a Raspberry Pi or Linux work. This has been tested on a Raspberry Pi 4 model B, using a laptop (headless install).
Skip this section if you have one ready to use.
Build a fresh image of the default Raspbian distribution on the micro SD card.
More info: https://www.raspberrypi.org/documentation/installation/installing-images/
Skip this subsection if you can just plug a keyboard, mouse and monitor.
These steps are relevant if you want to control the Raspberry headless, from another computer. If you prefer plugging in a keyboard, mouse and screen, do it since it is much easier. In short, we enable SSH and connect via command line to setup a VNC connection, from which we can see and control the desktop from another computer. We have a few things to do on the Micro SD card before passing it to the Raspberry Pi.
Create a valid wpa_supplicant.conf
file on the Micro SD card. It contains the information the Raspberry needs to connect to your Wifi. Follow the instructions from this resource: https://www.raspberrypi.org/documentation/configuration/wireless/headless.md
Creatie a file just named SSH
in the boot folder (in the Micro SD card).
More info: https://www.tomshardware.com/reviews/raspberry-pi-headless-setup-how-to,6028.html
1.2.3. Put the Micro SD card into the Raspberry Pi, switch it on (i.e. power it via the USB-C port), and wait until it connects your wifi
If it fails, you have to restart from step 2.a.
I found the easiest way to be the FING app on a smartphone, but there are many ways. Check this: https://howchoo.com/pi/find-your-raspberry-pis-ip-address
On Windows, I use Putty.
For instance, using Putty. Enter the IP address and connect to it. The login is "pi" and the password "raspberry".
There is a built-in tool to configure most things from SSH. Our goal from there is to configure a VNC connection that we can use to see the Raspberry Pi's user interface from another computer.
- Enter
sudo raspi-config
to enter the config interface. - Select
5 Interfacing options
- Select
P3 VNC
- Select
<YES>
and hit ENTER - Navigate to
<FINISH>
and hit ENTER
VNC is now enabled on the Raspberry. More info: https://www.tomshardware.com/reviews/raspberry-pi-headless-setup-how-to,6028.html
Then create a new connection using the Raspberry's IP address (that's all you need).
When I tried this, VNC could not display the screen of the Raspberry. There is a fix to that. We can change the resolution in the config tool, and then we will see the screen.
- Again, enter
sudo raspi-config
from the SSH connection. - Select
7 Advanced options
- Select
A5 Resolution
- Select
DMT Mode 82 1920x1080 60Hz 16:9
(or try another one) - Select
<FINISH>
and hit ENTER - When asked
Would you like to reboot now?
chose<YES>
- ...wait until it reboots and reconnects to the wifi...
- Now it should work.
These things are language configuration, updates etc. Just follow the steps. Nothing unusual, you don't have much to do. It's long, though. Just a warning: if you change the password and then try to connect from VNC, think of updating the password in VNC too.
Open a terminal, and clone the repository from GitHub by using this line:
git clone https://github.com/jacomyma/edo-pi-lpx.git
(or whatever the URL of this repository is). This will install the code in a repository located at /home/pi/edo-pi-lpx
.
Install mido:
pip3 install mido
Install rt-midi:
pip3 install python-rtmidi
In a nutshell, we add a line of code to execute the script on boot. But since it's the first time we run crontab
it's going to configure.
Type in a terminal:
crontab -e
Since it's the first time, it asks which editor to use. Pick the first one.
@reboot sleep 12 && cd /home/pi/edo-pi-lpx && python3 run.py
Note: if you have used another path, update the line above.
The script is now installed, you can shut the Raspberry Pi down.