A normal microporcessor (like what the Arcduino Uno uses) can't put out an analog voltage: The 'analogWrite' function is how you set a pin to PWM output mode, making it one of the most asinine function names in the history of software engineering. We can fix the mistake, though: A simple low-pass filter in the form of a resistor and a capacitor can smooth it out to an actual variable voltage, varying from low rail to high rail by varing the duty cycle from 0% to 100%. Arduino Uno Playlist: https://www.youtube.com/playlist?list=PLoNmuzhZIVoo0OjX-fHYO9fO2UdFJyUKK Tips And Tricks Playlist: https://www.youtube.com/playlist?list=PLoNmuzhZIVorIpGiz9GH4W2WAxmTZergy Signal Processing and Filtering Playlist: https://www.youtube.com/playlist?list=PLoNmuzhZIVoqET_5MEGLc1_VAiTXpyZHw You can join me on Discord as well! -- https://discord.gg/Rnvpscg