Adafruit DC & Stepper Motor HAT and SenseHat

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
goobertek
 
Posts: 184
Joined: Tue Feb 03, 2015 9:45 pm

Adafruit DC & Stepper Motor HAT and SenseHat

Post by goobertek »

Maybe I am trying to do too much. I am building a robot. The motors are controlled with a Adafruit DC & Stepper Motor HAT. On top of that I have a SenseHat. I am using a wireless USB game controller to drive it and I am attempting to get analog sound played through a speaker at the same time.

The SenseHat, Motor Controller and USB Game controller all seem to work (with a few minor glitches). However, the audio isn't when I plug in the audio I get lots of noise and no playback. I had it working before I added the SenseHat. I created a function which uses mpg123 that looks like the following:

Code: Select all

def PlaySound(PlaySound):
    tempstring = "mpg123 " + PlaySound 
    print(tempstring)
    x =threading.Thread(target=os.system, args=(tempstring,))
    x.start() 
I am using a thread because I want to the sound to play in the background while lights are flashing on the SenseHat.

Is there an easier way of doing this? The Audio quality is pretty bad as well.

What devises should I turn on/off in raspi-config?

User avatar
goobertek
 
Posts: 184
Joined: Tue Feb 03, 2015 9:45 pm

Re: Adafruit DC & Stepper Motor HAT and SenseHat

Post by goobertek »

I figured out the problem. It's my webcam that's pushing static through the speaker. Need to figure out how to disable mic on webcam

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”