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

Hit/Shock Sensor Module

Hit/Shock Sensor Module

Below you can see the corresponding code: An example project for the Shock Sensor//Author: Danny va..

2.36€ Ex Tax: 1.95€

Touch Sensor Module

Touch Sensor Module

Im Folgenden finden Sie den entsprechenden Code zu sehen: Ein Beispiel für ein Projekt für die KY-0..

2.36€ Ex Tax: 1.95€

Mercury Switch / Magic Light Cup Module

Mercury Switch / Magic Light Cup Module

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

2.49€ Ex Tax: 2.06€

Obstacle Avoidance Sensor Module

Obstacle Avoidance Sensor Module

Below the corresponding code://Author: Danny van den Brande. BlueCore Tech. Arduinosensors.nl //Thi..

2.49€ Ex Tax: 2.06€