IDUINO for Maker’s life User Manual for SMD RGB LED Module (SE037) www.openplatform.
IDUINO for Maker’s life Introduction RGB LED module consists of a full-color LED made by R, G, B three pin PWM voltage input can be adjusted. Primary colors (red/blue / green) strength in order to achieve full color mixing effect. Control the module with the Arduino can be achieved Cool lighting effects. Pinout Pin Name Description “R” Red light “G” Green light “B” Blue light “-” Ground www.openplatform.
IDUINO for Maker’s life Example In this example, we blink a LED and using an RGB LED we can generate any color we want.
IDUINO for Maker’s life /* Sets an led to any color led - a three element array defining the three color pins (led[0] = redPin, led[1] = greenPin, led[2] = bluePin) color - a three element boolean array (color[0] = red value (LOW = on, HIGH = off), color[1] = green value, color[2] =blue value) */ void setColor(int* led, boolean* color){ for(int i = 0; i < 3; i++){ digitalWrite(led[i], color[i]); } } /* A version of setColor that allows for using const boolean colors */ void setColor(int* led, const boolean*