กลับไปหน้ารวมไฟล์
led-rgb-with-arduino-962fe3-en.md

To start using an RGB Led you have to know the pins of the led as follows;

DATASHEETLEDRGB

RGB LED Pinout

Now for this project that I made, I used a common cathode RGB led.

  • Connect pin R (RED) to pin number 6 of the Arduino board.
  • Connect pin GND to pin GND of the Arduino board.
  • Connect pin G (Green) to pin number 5 of the Arduino board.
  • Connect pin B (Blue) to pin number 3 of the Arduino board.
  • Andfinallyuploadthecode:)

Final Circuit Result

This would be the final result if all the connections were followed.

Technical Details: PWM Color Synthesis

This project explores the physics of light through digital Pulse Width Modulation (PWM).

  • Analog Output Mapping: The Arduino sends 8-bit PWM signals (values from 0-255) to the Red, Green, and Blue pins of the common-cathode RGB LED. By independently varying the duty cycle (brightness) of each color channel, millions of distinct colors can be synthesized.
  • Dynamic Fading Algorithm: The code can include a software "Color Loop" that cycles through the HSL (Hue, Saturation, Lightness) color space, creating smooth, rainbow-like transitions instead of abrupt color changes.

Advanced Calibration

  • Gamma Correction: For a more advanced version of this project, a lookup table can be implemented to apply gamma correction. This compensates for the non-linear way human eyes perceive brightness, making color fades and dimming appear significantly smoother and more natural.

Thank you for taking the time to make my project, I hope you like it. :)

It's my first time uploading projects here, so sorry if I missed a step.

My Tinkercad: https://www.tinkercad.com/users/gfOgEin92Vh?category=circuits&sort=likes&view_mode=default

ข้อมูล Frontmatter ดั้งเดิม

apps:
  - "1x Arduino IDE"
author: "juanreyes13"
category: ""
components:
  - "1x Arduino UNO"
  - "1x Solderless Breadboard Full Size"
  - "1x RGB Diffused Common Cathode"
  - "1x USB-A to B Cable"
  - "3x Resistor 330 ohm"
  - "5x Jumper wires (generic)"
description: "In simple words it is like correctly connecting an RGB Led with Arduino. I hope you like it ;)"
difficulty: "Easy"
documentationLinks: []
downloadableFiles: []
encryptedPayload: "U2FsdGVkX1/YDH/jLuDEwJs0FCxaxCM/gFc6x2qJdDkebZ7fO8X441IVlFq6IKmnqoUcf3syf6GkUBP7E6ZiPCc1SwEQB/k7Z3Qg7m55LXI="
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/led-rgb-with-arduino-962fe3_cover.jpg"
lang: "en"
likes: 0
passwordHash: "1616f417cb2f4acce93f78c95b223aa389f7bbc3ae2f5223ec314878123a4dbb"
price: 435
seoDescription: "Learn how to connect an RGB Led to an Arduino correctly with this simple guide for beginners."
tags:
  - "lights"
title: "Led RGB, with Arduino"
tools: []
videoLinks: []
views: 1137