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: 12
  • 2.36€

  • Ex Tax: 1.95€

Similar Products

2 Color LED Module RG Small

2 Color LED Module RG Small

Below the corresponding code:// Arduino test code for KY011 int redpin = 11; // select the pin for ..

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€

Hall Magnetic Sensor Module (analog)

Hall Magnetic Sensor Module (analog)

Below you can see the corresponding code:An example of a project for the KY-035/* Author: Danny van..

2.36€ Ex Tax: 1.95€

Laser Receiver

Laser Receiver

Below you can see the corresponding code.an example project for the Laser Receiver.//Author Danny va..

3.50€ Ex Tax: 2.89€