Hi Chill,
This is pretty cool and I gave it a shot today. The only thing not
working are the buttons and I may have misunderstood one of your
instructions due to a lack of knowledge.
When you say, "Make /home/tc/sbpd-script.sh executable:
Code:
--------------------
chmod +x /home/tc/sbpd-script.sh
--------------------
" isn't that the same file name as the instruction immediately previous
to it? Or am I not naming it right? How do I make it an executable other
than adding .exe at the end?
Thanks,
Howard
chill wrote:
> INSTALLATION INSTRUCTIONS AS OF 5 MAY 2020, UPDATED TO INCLUDE PAUL'S
> DISPLAY OVERLAY AND A WARNING ABOUT UPDATED VERSIONS OF THE PIRATE AUDIO
> BOARDS:
>
> Put a fresh pcp6.0.0 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
--------------------
> >
>
> Add the following lines to config.txt, in the Custom Configuration
> area at the end of the file (between the Begin-Custom and End-Custom
> lines)
> >
Code:
--------------------
> > dtoverlay=st7789v-spi
> gpio=25=op,dh
--------------------
> >
>
> Boot the RPi from this SD card.
>
> Find the ip address of the RPi, and enter this in a browser. Once the
> RPi has booted up, this should bring up the pCP web interface.
>
> DISPLAY:
> Scroll down to 'Additional functions' and click on 'Extensions'. Wait
> for three green ticks, then click on the 'Available' tab. In the
> 'Available extensions in the piCorePlayer repository' section, 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.)
>
> The screen should now show console messages during boot, then the
> piCorePlayer splash screen, then Jivelite Choose Language.
>
> BUTTONS:
> Go back to the pCP web interface and load pcp-sbpd.tcz from the
> Extensions page.
>
> Make a /home/tc/sbpd-script.sh with the following content.
> N.B. PIMORONI NOW SEEM TO BE SHIPPING BOARDS WHICH USE A DIFFERENT
> GPIO FOR THE Y BUTTON. IF THE Y BUTTON ON YOUR BOARD DOES NOT WORK
> WITH THIS SCRIPT, IT MAY BE NECESSARY TO CHANGE THE LINE 'SW4=20' TO
> 'SW4=24'
> >
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
>
> count=10 # approx time limit in seconds
> while ! pigs t >/dev/null 2>&1 ; do
> if [ $((count--)) -le 0 ]; then
> printf "\npigpiod failed to initialize within time limit\n"
> exit 1
> fi
> # 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:
> >
Code:
--------------------
> > chmod +x /home/tc/sbpd-script.sh
--------------------
> >
>
> Add /home/tc/sbpd-script.sh to user commands (bottom of the 'Tweaks'
> page), then save.
>
> SOUND:
> Set up the Squeezelite output device on the 'Squeezelite Settings'
> page, e.g. to 'HiFiBerry DAC Zero/MiniAMP'. Click 'Save' and accept
> the reboot prompt.
>
> That's it. The three main functions - display, buttons, sound output
> - should all now work.
------------------------------------------------------------------------
Howard Passman's Profile: http://forums.slimdevices.com/member.php?userid=16674
View this thread: http://forums.slimdevices.com/showthread.php?t=111502
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix