-
Notifications
You must be signed in to change notification settings - Fork 7
Software installation
First we need to prepare a boot image for the raspberry pi w zero's boot micro SD card. I recommend an 16GB+ at least U1 speed SD card for this project. The image itself typically takes up to 4G. The rest will be the storage for you projects and patches.
For this project I used Comitup linux distribution.
Link: https://davesteele.github.io/comitup/
It's a nice environment that supports Wifi broadcasting. We need this because we can not access content on boot SD by just plugging into the computer. This wifi broadcasting enables us to access files on the OP-1 Manager on the go by just connecting to it's WIFI hotspot.
Installing bootable image are quite easy with Etcher. So, I am not including it’s installation steps here.
Once the image is installed on to the SD card go ahead plug it into the SD card slot on raspberry pi. And power it up. After it's fully booted. Connect to its wifi hotspot. Then you can access the system with SSH.
Check for the Raspberry pi's IP address for SSH access.
ssh pi@xxx.xxx.xxx
Enter the raspi-config interface to change password, turn on i2c, serial, and SSH services.
sudo raspi-configChange your login password is important because when SSH is enabled. The default password is basically known by whoever own a reapberry pi. You will want your valuable patches, and project to be SECURE right!!? So please do not forget to change your password.
sudo raspi-configThen go to option 1 "Change User Password" to change your password.
Enable I2C for OLED, and fuel gauge devices.
Then go to option 5 Interfacing Options and then I2C to enable your i2c port.
Enable SSH for remote access.
Then go to option 5 Interfacing Options and then SSH to enable your i2c port.
First No then Yes.
Then go to option 5 Interfacing Options and then Serial to enable your serial port.
If you are using the MIDI. We need to make ensure the bluetooth is not halting the serial port. These commands moves bluetooth to a slower uart port.
sudo nano /boot/config.txtGoto the bottom of the script and add following lines
enable_uart=1
dtoverlay=pi3-miniuart-bt
dtoverlay=midi-uart0Then reboot...
sudo rebootsudo apt-get update
sudo apt-get install python3-pip git libasound-dev libjack-dev
libatlas3-base python3-dev python3-pip libfreetype6-dev libjpeg-dev
build-essential libopenjp2-7 libtiff5I2C tools for the display
The OLED display uses Luma display driver.
Luma is a python module that are capable to drive various oled displays.
This project is tested and work with SSD1306 and SH1106 oled 128x64 i2c displays.
Following commands installs Luma oled driver.
sudo apt-get install -y python-smbus
sudo apt-get install -y i2c-tools
sudo pip3 install luma.oledDO NOT use sudo other wise you won't be able to r/w at SFTP session. And and will need to chmod 0777 -r /path/to/folder
to change the access permission.
git clone https://github.com/adwuard/OP_Manager.gitEnter the OP_Manager Folder
cd OP_Managerinstall python pip libraries
sudo pip3 install -r requirement.txtThen reboot..
sudo rebootsudo python3 OP_Manager/run.py
# Exit with keyboard interruptsudo nano OP_Manager/opmanager.serviceThen add following service and ensure python project path is correct.
[Unit]
Description=OPManager
After=raspi-config.service
[Service]
ExecStart=/usr/bin/sudo /usr/bin/python3 -u run.py
WorkingDirectory=/home/pi/OP1_File_Organizer
StandardOutput=inherit
StandardError=inherit
Restart=always
User=pi
[Install]
WantedBy=multi-user.targetThen exit the editor
sudo cp opmanager.service /etc/systemd/system/opmanager.servicesudo systemctl enable opmanager.serviceOnce it is enabled the program should start on boot. you can now reboot and test it.