Hello good people,
I need a program for the Arduino where the value of the light intensity, measured on an analog input pin of the Arduino, is used as the upper limit for the PWM modulation of your two LEDs. The LEDs are modulated in opposite directions.
The modulation thus affects between minmod and maxmod, where the value of maxmod is determined by a measured value from one of the analog ports of the Arduino. The more light there is, the larger maxmod becomes and the slower the modulation. The less light there is, the smaller maxmod becomes and the faster the modulation.
At the beginning of the program, you even turn on both LEDs to see if they work.
In the course material you will find the instructions for reading an analog port on the Arduino.
Make sure maxmod never exceeds 255.
Can someone help me please write this code?