Esp32 arduinio code

Job ID: 33665934

Budget: $10 – $30 USD

In this lab, we will investigate pulse-width modulation and interrupts.

Our design intent, is to push a button on the MCU which triggers an interrupt. Once triggered, the specified color LED on the development board must fade-in linearly (min to max intensity) during an interval of x seconds, stay at maximum brightness for y seconds, and then fade-out linearly (max brightness to off) with a duration of z seconds.
Your personalized values for x, y, z, and color are given in the attached PDF. In this lab, you cannot make use of "delay" or equivalent routines (millis) to implement the intervals but must make use of the timers incorporated into MCU. Furthermore, you must implement LED intensity variations through the use of pulse-width modulation. You should use the ledcXXXX routines to control the pulse witdth modulation. You should use the hardware timers to control the time (see hw_timer_t data structures for ESP32). What is the PWM frequency at which you can no longer see the LED flashing but looks "steady"? Experiment with different frequencies. You should implement the design on the ESP32 Arduino development board.