I’m a software engineer who has a small amount of experience coding for arduinos but not much experience on the hardware side. I’m working on a personal project that will require me to turn a servo motor a certain amount based on how much a dimmer switch is turned (the dimmer switch will also need to control a lightbulb). For example, I may want to map a 270° servo rotation to the entire range of the dimmer switch.
From my research it appears that connecting and controlling a servo motor is fairly trivial. However, I’m having difficulties figuring out how to connect the dimmer switch and read the voltage (especially with modern dimmers that seem to cut up the voltage based on time as opposed to just lowering it). Also not sure if it would be easier to use an existing dimmer switch (preferable as this minimizes the changes to the existing design), or build that functionality into the Arduino.
Thank you for any suggestions!