willpearson
Posts: 8
Joined: Mon Nov 20, 2017 4:48 pm

Adafruit Speaker Bonnet breaks scratch :(

Tue Sep 18, 2018 1:02 pm

Hi,

I'm new to all this but am trying to run raspbian on a pi zero w with a 4tronix motor controller board and a new adafruit speaker bonnet. To make a robot with stereo sound! (There's no pin clash).

Everything was working fine until I followed the installation instructions for the speaker bonnet found here:

https://learn.adafruit.com/adafruit-spe ... stall-5-12

Now the speakers work fine, but when I try to load scratch it won't load. The pi just hangs for a few minutes then carries on as it was. There are no error messages. This is the same for scratch 1.4, scratch 2.0 and also scratch GPIO 8Plus (via @cymplecy).

So I think there is something in the installation instructions: editing raspi blacklist and asound.conf or adding device tree overlay that prevents scratch from working but I don't understand this stuff well enough to work it out. I can't find anyone else having trouble, but maybe not may people are running scratch with a speaker bonnet?

Does anyone have any bright ideas? Do the installation instructions make more sense to you? What could stop scratch from running? Any suggested next steps??

Many thanks!

Will

scotty101
Posts: 3100
Joined: Fri Jun 08, 2012 6:03 pm

Re: Adafruit Speaker Bonnet breaks scratch :(

Tue Sep 18, 2018 1:33 pm

Can you try running scratch from a terminal window?
It might output some error messages that would help to debug this problem.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

willpearson
Posts: 8
Joined: Mon Nov 20, 2017 4:48 pm

Re: Adafruit Speaker Bonnet breaks scratch :(

Tue Sep 18, 2018 1:47 pm

Can you briefly tell me how to do that? I've done a few commands in terminal but haven't run scratch... thanks for the idea!

willpearson
Posts: 8
Joined: Mon Nov 20, 2017 4:48 pm

Re: Adafruit Speaker Bonnet breaks scratch :(

Tue Sep 18, 2018 7:45 pm

OK - so I tried to launch scratch from terminal and it caused a crash and reboot - no error messages :(

aBUGSworstnightmare
Posts: 951
Joined: Tue Jun 30, 2015 1:35 pm

Re: Adafruit Speaker Bonnet breaks scratch :(

Wed Sep 19, 2018 7:54 am

Just for the sake of asking the question: have you tested with the Speaker bonnet only? Or is your motor controller still connected? Which board do you use?
The RoboHAT uses pins needed for I2S Interface (18-20; https://4tronix.co.uk/blog/?p=1196).

willpearson
Posts: 8
Joined: Mon Nov 20, 2017 4:48 pm

Re: Adafruit Speaker Bonnet breaks scratch :(

Fri Sep 21, 2018 5:50 pm

Thanks - that's a good question!

I will try it without the motor controller (it's a piconzero) - I guess I should also try it on a fresh install of raspbian.

willpearson
Posts: 8
Joined: Mon Nov 20, 2017 4:48 pm

Re: Adafruit Speaker Bonnet breaks scratch :(

Sat Sep 22, 2018 3:22 pm

OK. I've removed the motor controller - so all I have is the pi zero w with the adafruit speaker bonnet on. I've booted up with a fresh install of raspbian (from noobs). I ran the adafruit instructions as above. Now scratch won't load.

So it's nothing to do with the motor controller - or anything else I've put on the pi zero.

The adafruit instructions don't seem to do all that much - but they do break scratch! Can anyone have a look at the steps in the adafruit script and see what the problem could be please? What could it possibly do that would stop scratch from loading?

IDLE, Libre office and python games all run fine.

What is it about scratch?

I'm a bit miffed :(

timrowledge
Posts: 1138
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Adafruit Speaker Bonnet breaks scratch :(

Wed Sep 26, 2018 4:54 am

Scratch tries to use the ALSA library - mostly because despite its many horrible issues it's the least terrible option - and we had so very many problems with it when developing nuScratch for the Pi. Not least the issue that it steals certain signals and doesn't chain back to the prior user. Now *that* can cause some fun.

You might feel brave enough to try editing /usr/bin/scratch a little. Consider commenting out the 'vm-sound-alsa' and replacing it with 'vm-sound-null', for example. That will cause it to not use any actual sound output code and woudl give us a clue about where the problem lies.

The scratch shell script also plays with the camera v4l2 & i2-dev modules, as well as potentially starting pigpiod. Removing any of them might make a difference too.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

Return to “Add-ons”

Who is online

Users browsing this forum: No registered users and 11 guests