The KY-034 Modulo Led 7 Colores, manufactured by Arduino (Part ID: Dos), is a versatile LED module capable of displaying seven different colors. This module is ideal for projects requiring visual indicators, decorative lighting, or simple color-changing effects. Its compact design and ease of use make it a popular choice for hobbyists and professionals alike.
The KY-034 module is designed for simplicity and flexibility. Below are its key technical details:
The KY-034 module has four pins, as described in the table below:
Pin | Name | Description |
---|---|---|
1 | R (Red) | Controls the red LED. Connect to a digital or PWM pin on the microcontroller. |
2 | G (Green) | Controls the green LED. Connect to a digital or PWM pin on the microcontroller. |
3 | B (Blue) | Controls the blue LED. Connect to a digital or PWM pin on the microcontroller. |
4 | GND (Ground) | Common cathode. Connect to the ground of the power supply or microcontroller. |
The KY-034 module is straightforward to use in circuits. Below are the steps and best practices for integrating it into your project.
R
, G
, and B
pins to digital or PWM-capable pins on your microcontroller.GND
pin to the ground of your power supply or microcontroller.R
, G
, and B
pins to prevent excessive current draw.Below is an example code snippet to control the KY-034 module with an Arduino UNO:
// Define the pins connected to the KY-034 module
const int redPin = 9; // Red LED pin
const int greenPin = 10; // Green LED pin
const int bluePin = 11; // Blue LED pin
void setup() {
// Set the LED pins as outputs
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
}
void loop() {
// Turn on Red LED
analogWrite(redPin, 255); // Full brightness for red
analogWrite(greenPin, 0); // Green off
analogWrite(bluePin, 0); // Blue off
delay(1000); // Wait for 1 second
// Turn on Green LED
analogWrite(redPin, 0); // Red off
analogWrite(greenPin, 255); // Full brightness for green
analogWrite(bluePin, 0); // Blue off
delay(1000); // Wait for 1 second
// Turn on Blue LED
analogWrite(redPin, 0); // Red off
analogWrite(greenPin, 0); // Green off
analogWrite(bluePin, 255); // Full brightness for blue
delay(1000); // Wait for 1 second
// Create a custom color (e.g., Cyan)
analogWrite(redPin, 0); // Red off
analogWrite(greenPin, 128); // Half brightness for green
analogWrite(bluePin, 128); // Half brightness for blue
delay(1000); // Wait for 1 second
}
LED Not Lighting Up:
GND
pin is properly connected.Incorrect Colors Displayed:
R
, G
, and B
pins are connected to the correct microcontroller pins.Dim or Flickering LEDs:
PWM Not Working:
R
, G
, and B
pins.By following this documentation, you can effectively integrate and troubleshoot the KY-034 Modulo Led 7 Colores in your projects.