Hey everyone, I was wondering if someone would be available to provide some help with a raspberry pi project I’m working on. I’m quite sure the answer is simple but I’m unable to find the answer on the web.
Creating a HiFi streaming station for my lounge area. Using a analog potentiometer to control the volume of the Pi out.
- Raspberry Pi
- USB Serial connection
- 50k Analog Potentiometer
- Inno-maker DAC HAT
I’ve got everything wired up, I’ve got the output from the Arduino going over serial to the Pi and I’m able to read the value from the Potentiometer on the Pi with a small bit of code on both the Arduino and Pi.
Where I’m stuck is with the code to use the data collected from the Potentiometer to control the volume of the Pi. I can’t seem to find any examples of how to do this with an analog input (Only digital).
I’m really wanting to get this done this week so I can get the enclosure designed and cut at work. I’d really appreciate some guidance if anyone is available to help.