Simple RPF Touchscreen Zynthian

From ZynthianWiki
Revision as of 07:18, 17 August 2017 by Gmeader (talk | contribs)
Jump to navigation Jump to search

How to get Zynthian working with a minimal amount of parts and no rotary encoders, no soldering etc., using the Official Raspberry Pi Foundation 7" Touchscreen.

This page is still being developed. Still trying to get it to work, and get these instructions exactly correct. Use at your own risk. Please edit this page if you have corrections.

1 Parts:

  • RASPBERRY PI 3 MODEL B $35 MCM Part #83-17300
  • RASPBERRY PI TOUCH DISPLAY $60 MCM Part #83-16872
  • 5.1VDC 2.5A Regulated AC Power Adapter $5.99 MCM Part #28-19338
  • MicroSD Card 16GB or larger
  • USB Audio Adapter based on the CM109 (Google: usb sound card cm109)

(also you should use/borrow a USB or Bluetooth keyboard, and an optional USB or Bluetooth mouse - temporarily to configure software)

2 Setup

  1. Download “Gorgona” SD Image for Zynthian for RBPi3 (8 GB) (you need bittorrent software (free) to download this)
http://blog.zynthian.org/download/zynthian_gorgona_rbpi3-2016-12-21.img.torrent
** Download web page: https://discourse.zynthian.org/t/merry-zynthians-and-happy-new-sd-image/314
  1. Flash the software on to the MicroSD card using Etcher https://etcher.io/ (free software works on Mac, Windows or Linux)
  2. Connect the touch display to the Raspberry Pi using the included instructions
  3. Insert the MicroSD card into the Raspberry Pi
  4. Connect the Raspberry Pi to the Internet using a Ethernet cable (or connect using WiFi)
  5. Connect the USB keyboard & mouse to the Raspberry Pi
  6. Connect the power Adapter to the Raspberry Pi and plug it into the wall.
  7. The Raspberry Pi will boot up Zynthian.

3 Configuration

  • If you do not have an Ethernet cable connection to the Internet, configure WiFi by (How to do this? clicking on the WiFi icon?).
  1. start the Terminal (need clear instruction on how to do that with Zynthian image)
  2. Ensure the Raspbian operating system is up to date by connecting your Pi to the internet and running the following commands in the terminal:
sudo apt-get update
sudo apt-get upgrade
sudo rpi-update

4 Configure Zynthian software

Connecting to your Zynthian box http://wiki.zynthian.org/index.php/Accessing_Zynthian_from_your_computer

Use a web browser to access your Zynthian box's admin web page . Depending on your setup you might try to just use http://zynthian.local/ - if that works, you don't need the IPaddress. Otherwise, You have to figure out what the Zynthian box's IP address is.

- update zynthian software from the admin menu
- update zynthian library from the admin menu
- restart GUI (or reboot) from the admin menu
cd /zynthian/zynthian-sys/scripts
./update_zynthian.sh
./update_zynthian.sh
./update_data.sh

4.1 Step 1: Edit fb1 to fb0 in all these files:

nano /etc/systemd/system/zynthian.service
nano /zynthian/zynthian-sys/sbin/splash-screen.sh
nano /zynthian/zynthian-sys/sbin/zynthian.sh
nano /zynthian/zynthian-ui/zynthian.sh
nano /zynthian/zynthian-ui/zynthian_gui_config.py

4.2 Step 2: Edit boot/config.txt

nano /boot/config.txt

Edit the following lines according to your screen or set to None and it will auto detect. Try None first if that does not work then put in screen width and height.

framebuffer_width=1024
framebuffer_height=600

comment out both lines

#dtoverlay=pitft28-capacitive,rotate=90,speed=32000000,fps=20
#dtoverlay=pitft28-resistive,rotate=90,speed=32000000,fps=20

If you are running the HDMI screen from the USB port add this line to the end of the file. changes the output voltage on all 4 usb combined from 600mA to double that, 1200mA. which is need for external hd or powering hdmi monitors. Note use a 2A power supply or greater.

max_usb_current=1

Add those lines at the end of the file suggested by the manufacture if None or framebuffer settings from above did not work. For example: 7" Waveshare display - the values below should be adjusted according to your screen

hdmi_goup=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0

4.3 Step 3: Edit Configure X11

nano /etc/X11/xorg.conf.d/99-pitft.conf

edit the file to look like this:

Section "Device"
Identifier "HDMI"
Driver "fbdev"
Option "fbdev" "/dev/fb0"
EndSection

4.4 Step 4: Reboot

shutdown -r now
4.4.1 ======================================================================

5 Alternate set of instructions

apt-get install nano

6 =1. Update

   cd /zynthian/zynthian-sys; git checkout .
   cd /zynthian/zynthian-ui; git checkout .
   cd /zynthian/zynthian-sys/scripts/
   ./update_zynthian.sh
   ./update_zynthian.sh #Yes twice - first run returns an error on a fresh installation
   ./update_zynthian_data.sh
   ./update_zynthian_recipes.sh
   ./update_zynthian_sys.sh

==2. Edit fb1 to fb0 in all three files:

nano /etc/systemd/system/zynthian.service
nano /zynthian/zynthian-sys/sbin/splash-    screen.sh
nano /zynthian/zynthian-sys/scripts/zynthian_envars.sh

==3. Also here:

nano /zynthian/zynthian-sys/etc/systemd/zynthian.service
# Find and modify the following line  
Environment=FRAMEBUFFER=/dev/fb0

==4. Edit boot/config.txt

nano /boot/config.txt

Edit the following lines according to your screen

framebuffer_width=1024
framebuffer_height=600

comment out both lines

#dtoverlay=pitft28-capacitive,rotate=90,speed=32000000,fps=20
#dtoverlay=pitft28-resistive,rotate=90,speed=32000000,fps=20

Add these lines at the end of the file (the values below should be adjusted according to your screen)

max_usb_current=1
hdmi_goup=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0

==5. Configure X11

cd /etc/X11/xorg.conf.d/

remove all files except 99-pitft.conf

edit the config

nano 99-pitft.conf

the file should look like this

Section "Device"
  Identifier "HDMI"
  Driver "fbdev"
  Option "fbdev" "/dev/fb0"
EndSection

==6. In order to increase font size:

   nano /zynthian/zynthian-ui/zynthian_gui_config.py


Find and modify the following lines

   topbar_height=48
   font_topbar=(font_family,18)
   font_listbox=(font_family,16)
   font_ctrl_title_maxsize=18