- PWM pin on at least 1 MHz microcontroller
- ADC input pin to read sensor value
- The code was written for an Atmega 328p based Arduino Nano but should work for any microcontroller with identical registers
- PWM duty cycle depends on microcontroller voltage. Try what results in the greatest range of voltage for your project