CURRENT BEST STEPS AS OF 09FEB2020 (TO SUIT NEW B9 IMAGE):
Put a fresh pcp6-b9 image on the SD card.

Whilst the SD card is still in the laptop:
Enter wifi credentials in wpa_supplicant.conf.sample and save as
wpa_supplicant.conf

Add these parameters to the end of cmdline.txt.  All of the parameters
in cmdline.txt should be on one continuous line, with a space between
each one.

Code:
--------------------
    fbcon=map:10 fbcon=font:VGA8x16
--------------------


Boot the RPi from this SD card.

The default file system is 58mb, so for this basic setup it is not
necessary to resize the FS - I have about 6.6mb to spare after this
setup.

Add these commands to /opt/bootlocal.sh to set up the framebuffer.  Make
sure they are inserted near the top of the file, BEFORE pcp_startup.sh.
(The init string in 'flexfb'
(https://github.com/notro/fbtft/wiki/flexfb) has now been constructed to
match the settings found in Pimoroni's sample 'def _init(self)' Python
function 'here'
(https://github.com/pimoroni/st7789-python/blob/master/library/ST7789/__init__.py)).
Note that the third line of the init code, highlighted in bold, can be
changed to '-1,0x36,0x70,\' (as per the Pimoroni original settings) to
rotate the display 90 degrees clockwise.

Code:
--------------------
    
  modprobe flexfb setaddrwin=0 width=240 height=240 init=\
  -1,0x01,\
  -2,150,\
  -1,0X36,0X00,\
  -1,0xB2,0x0C,0x0C,0x00,0x33,0x33,\
  -1,0x3A,0x05,\
  -1,0xB7,0x14,\
  -1,0xBB,0x37,\
  -1,0xC0,0x2C,\
  -1,0xC2,0x01,\
  -1,0xC3,0x12,\
  -1,0xC4,0x20,\
  -1,0xD0,0xA4,0xA1,\
  -1,0xC6,0x0F,\
  
-1,0xE0,0xD0,0x04,0x0D,0x11,0x13,0x2B,0x3F,0x54,0x4C,0x18,0x0D,0x0B,0x1F,0x23,\
  
-1,0xE1,0xD0,0x04,0x0C,0x11,0x13,0x2C,0x3F,0x44,0x51,0x2F,0x1F,0x1F,0x20,0x23,\
  -1,0x21,\
  -1,0x11,\
  -1,0x29,\
  -2,100,\
  -3
  modprobe fbtft_device name=flexfb speed=32000000 cs=1 gpios=dc:9
  
--------------------


Load the pcp-jivelite_default-qvga240squareskin.tcz extension

In the Jivelite section of the tweaks page, change the Framebuffer to
/dev/fb1 and click on 'Set FB'.  The Frame Rate and Frame Depth can be
left blank - they will default to 22 and 32 respectively, which are
fine.

Install Jivelite from the Tweaks page (this step includes an automatic
backup, so accept the reboot prompt.)

Screen should show console messages during boot, then piCorePlayer
splash screen, then Jivelite ‘Choose Language’.

install pcp-sbpd.tcz

Make a /home/tc/sbpd-script.sh with the following content:

Code:
--------------------
    #!/bin/sh
  
  # start pigpiod daemon
  pigpiod -t 0 -f -l -s 10
  
  # wait for pigpiod to initialize - indicated by 'pigs t' exit code of zero
  
  while ! pigs t >/dev/null 2>&1 ; do
        printf "\nWaiting for pigpiod to initialize\n"
        sleep 1
  done
  printf "\npigpiod is running\n"
  
  # load uinput module - required to be able to send keystrokes
  # then set the permission to group writable, so you don't need to run sbpd 
with root permissions
  sudo modprobe uinput
  sudo chmod g+w /dev/uinput
  
  # The full list of Jivelite key commands can be found here:
  # https://github.com/ralph-irving/tcz-lirc/blob/master/jivekeys.csv
  
  # button A
  SW1=5                                                         # GPIO pin 
number
  SH1=KEY:KEY_EQUAL                             # command for SHORT press ( = 
volume up)
  LO1=KEY:KEY_SPACE                             # command for LONG press (= 
pause)
  LMS1=250                                              # milliseconds for long 
press
  
  # button B
  SW2=6
  SH2=KEY:KEY_MINUS                             # ( = volume down)
  LO2=KEY:KEY_Q                                 # ( = power)
  LMS2=250
  
  # button X
  SW3=16
  SH3=KEY:KEY_UP
  LO3=KEY:KEY_RIGHT
  LMS3=250
  
  # button Y
  SW4=20
  SH4=KEY:KEY_DOWN
  #LO4=KEY:KEY_LEFT
  LO4=KEY:KEY_ESC
  LMS4=250
  
  #CMD="sbpd -v -f /home/tc/sbpd_commands.cfg \
  CMD="sbpd -v \
  b,$SW1,$SH1,2,0,$LO1,$LMS1 \
  b,$SW2,$SH2,2,0,$LO2,$LMS2 \
  b,$SW3,$SH3,2,0,$LO3,$LMS3 \
  b,$SW4,$SH4,2,0,$LO4,$LMS4"
  
  echo $CMD
  $CMD > /dev/null 2>&1 &
--------------------


Make /home/tc/sbpd-script.sh executable: chmod +x
/home/tc/sbpd-script.sh

Add /home/tc/sbpd-script.sh to user commands, then save (this step
includes an automatic backup, so go to main page and reboot).

Jivelite should be fully functional now, including navigation with the
four buttons.

Set up the Squeezelite output device, e.g. to 'HiFiBerry DAC
Zero/MiniAMP'

Add this to config.txt

Code:
--------------------
    gpio=25=op,dh
--------------------


Reboot one more time to finish the process.


------------------------------------------------------------------------
chill's Profile: http://forums.slimdevices.com/member.php?userid=10839
View this thread: http://forums.slimdevices.com/showthread.php?t=111502

_______________________________________________
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to