Close

Hardware test build

A project log for 1 RGB LED Clock

A clock showing hours and minutes using only one RGB-LED to display the data

paul-schmitzPaul Schmitz 07/23/2017 at 16:080 Comments

For testing, I'm using an Arduino Nano clone as a microcontroller.

As it is easier to see the individual colors, I used individual LEDs for red, green and blue. They are connected from three digital Pins on the Arduino (D5, D6 and D7) and a resistor network of 680 Ohms, which connects to ground (GND on the Arduino).

The LEDs (from China) I use don't need very high current to light up, but they have different brightness at around same current. That could be fixable by using different resistor values, or using PWM.

I also wrote a simple code to test if everything works. It lights up the LEDs one at a time. (I'm using the Arduino IDE):

void setup(){
  pinMode(5,OUTPUT);
  pinMode(6,OUTPUT);
  pinMode(7,OUTPUT);
}
void loop(){
  digitalWrite(5,HIGH);
  digitalWrite(6,LOW);
  digitalWrite(7,LOW);
  delay(1000);
  digitalWrite(5,LOW);
  digitalWrite(6,HIGH);
  digitalWrite(7,LOW);
  delay(1000);
  digitalWrite(5,LOW);
  digitalWrite(6,LOW);
  digitalWrite(7,HIGH);
  delay(1000);
}

Discussions