EasyManua.ls Logo

Elegoo Mega2560 - Example Picture

Elegoo Mega2560
224 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
58
/
223
blueValue = 0;
This function takes three arguments, one for the brightness of the red, green and
blue LEDs. In each case the number will be in the range 0 to 255, where 0 means off
and 255 means maximum brightness. The function then calls 'analogWrite' to set
the brightness of each LED.
If you look at the 'loop' function you can see that we are setting the amount of red,
green and blue light that we want to display and then pausing for a second before
moving on to the next color.
#define delayTime 10 // fading time between colors
delay(delayTime);
Try adding a few colors of your own to the sketch and watch the effect on your LED.
Example picture

Table of Contents