Tinket M0 to raspi volume
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Quaddam
- Posts: 52
- Joined: Fri Nov 11, 2016 1:49 pm
Tinket M0 to raspi volume
I am building an arcade and I am just wondeirng if anyone has ever used a trinket to control the volume on the raspi via potentiometer. I am using 3 potentiometers attached to the trinket to control the colours on an LED strip that sits in the arcade. But I am looking for ways to control the usb speaker I have attached to the raspi, just wondering if anyone had done this? thnx
- adafruit_support_mike
- Posts: 67391
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Tinket M0 to raspi volume
I don't know of anything specific.
Generally speaking, you'll probably control audio volume on a RasPi through ALSA. Communication between a RasPi and a microcontroller is generally done by a Serial connection or by using the GPIO pins to represent signals. You should be able to capture information either of those ways, and use it to generate ALSA volume control commands.
If you're running an emulator, check to see if it has existing hooks to adjust the volume. Emulators are generally written for keyboard input, and emulator environments convert GPIO signals to keyboard signals anyway. If it's possible to add a couple more virtual keys for 'volume up' and 'volume down', that would probably be easiest.
Generally speaking, you'll probably control audio volume on a RasPi through ALSA. Communication between a RasPi and a microcontroller is generally done by a Serial connection or by using the GPIO pins to represent signals. You should be able to capture information either of those ways, and use it to generate ALSA volume control commands.
If you're running an emulator, check to see if it has existing hooks to adjust the volume. Emulators are generally written for keyboard input, and emulator environments convert GPIO signals to keyboard signals anyway. If it's possible to add a couple more virtual keys for 'volume up' and 'volume down', that would probably be easiest.
- Quaddam
- Posts: 52
- Joined: Fri Nov 11, 2016 1:49 pm
Re: Tinket M0 to raspi volume
Ah yes! Great idea about using the emulator for volume I’ll look into it, thanks for your help!
Please be positive and constructive with your questions and comments.