rgb led schematic

arduino koden

const int redpin = 11;
const int greenpin = 10;
const int bluepin = 9;

void setup() 
{
  pinMode(redpin, OUTPUT);
  pinMode(greenpin, OUTPUT);
  pinMode(bluepin, OUTPUT); 
}

void loop() 

{
  digitalWrite(redpin, HIGH);
  digitalWrite(greenpin, LOW);
  digitalWrite(bluepin, LOW);
  delay(1000);
  digitalWrite(redpin, LOW);
  digitalWrite(greenpin, HIGH);
  digitalWrite(bluepin, LOW);
  delay(1000);
  digitalWrite(redpin, LOW);
  digitalWrite(greenpin, LOW);
  digitalWrite(bluepin, HIGH);
  delay(1000);
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s