arduino随笔(2)

#define B_COLOR 10
#define G_COLOR 11
#define R_COLOR 12

void setup()
{
  pinMode(B_COLOR,OUTPUT);
  pinMode(G_COLOR,OUTPUT);
  pinMode(R_COLOR,OUTPUT);
}
void loop()
{
  digitalWrite(B_COLOR,HIGH);
  delay(1000);
  digitalWrite(B_COLOR,LOW);
  delay(1000);
  digitalWrite(G_COLOR,HIGH);
  delay(1000);
  digitalWrite(G_COLOR,LOW);
  delay(1000);
  digitalWrite(R_COLOR,HIGH);
  delay(1000);
  digitalWrite(R_COLOR,LOW);
  delay(1000);
}

arduino随笔(2)_第1张图片

你可能感兴趣的:(arduino随笔(2))