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

Vibration Sensor Module

Vibration Sensor Module

Below the corresponding code:an example project for the Vibration Sensor//Author: Danny van den Bran..

2.29€ Ex Tax: 1.89€

Ultrasonic capteur Distance - HC SR04

Ultrasonic capteur Distance - HC SR04

Below you can see the corresponding code :An example of a project for Distance Sensor/* Author: Dan..

2.99€ Ex Tax: 2.47€

Sound Sensor Module

Sound Sensor Module

Below the corresponding code:Example code: Digital output.int Led = 13 ;// define LED Interfaceint b..

2.29€ Ex Tax: 1.89€

Infrared Emission / Sender

Infrared Emission / Sender

Below the corresponding code:# Include <IRremote.h> int RECV_PIN = 11; / / define input pin o..

2.36€ Ex Tax: 1.95€