3 Color LED Module RGB

  • 3 Color LED Module RGB

Below the corresponding code:


//KY016 3-color LED module
int redpin = 11; // select the pin for the red LED
int bluepin = 10; // select the pin for the blue LED
int greenpin = 9 ;// select the pin for the green LED
int val;
void setup () {
pinMode (redpin, OUTPUT);
pinMode (bluepin, OUTPUT);
pinMode (greenpin, OUTPUT);
Serial.begin (9600);
}
void loop ()
{
for (val = 255; val> 0; val --)
{
analogWrite (11, val);
analogWrite (10, 255-val);
analogWrite (9, 128-val);
delay (10);
Serial.println (val, DEC);
}
for (val = 0; val <255; val ++)
{
analogWrite (11, val);
analogWrite (10, 255-val);
analogWrite (9, 128-val);
delay (10);
Serial.println (val, DEC);
}
}

SCHEMATIC:
Arduino pin 11 --> Pin R module
Arduino pin 10 --> Pin G module
Arduino pin 9 --> Pin B module
Arduino pin GND --> Pin - module
You don't need any resistors, these are already included on the module

Write a review

Please login or register to review

3 Color LED Module RGB

  • Webwinkel Keurmerk en klantebeoordelingen

  • 14 dagen bedenktijd 
  • Verzendkosten voor eigen rekening
  • Product Code: KY-016
  • Availability: 14
  • 2.36€

  • Ex Tax: 1.95€

Similar Products

Tilt Switch Sensor Module

Tilt Switch Sensor Module

Below you can see the corresponding code: An example project for the Tilt Switch/* Author: Danny v..

2.29€ Ex Tax: 1.89€

7 Color LED Module

7 Color LED Module

Below the corresponding code:/ * BlinkTurns on an LED on for two second, then off for two second, r..

2.36€ Ex Tax: 1.95€

Photoelectric sensor / photo interrupter

Photoelectric sensor / photo interrupter

Below you can see the corresponding code:An example of a project for the ky-010//Author: Danny van d..

2.29€ Ex Tax: 1.89€

Active Buzzer Module

Active Buzzer Module

Below the corresponding code://Example code KY012 active buzzer int speakerPin = 8;void setup () { ..

1.95€ Ex Tax: 1.61€