AVR®: Updating PWM Duty Cycle from ADC Sensor Reading
In this video:
- Update the PWM duty cycle based upon the ADC result register.
- Open AVR_PWM.c from a previous video.
- Copy relevant PWM_init_LED() function, defines, and interrupt service routines back into this project.
- Verify that we can change the LED brightness by varying the POT connected to the ADC.
- Find the user guide and schematics for the I/O1 Xplained Pro (ATIO1-XPRO) from the product page.
- Connecting the I/O1 Xplained Pro to the ATmega328P Xplained Mini.
- Verifying that we are now able to change the LED brightness as the light sensor reading changes.