7 SEGMANT
CODE !
void setup() {
pinMode(3, OUTPUT);
pinMode(2, OUTPUT);
pinMode(1, OUTPUT);
pinMode(0, OUTPUT);
}
void loop() {
one();
delay(500);
two();
delay(500);
tree();
delay(500);
}
void one() {
digitalWrite(0, LOW);
digitalWrite(1, LOW);
digitalWrite(2, LOW);
digitalWrite(3, HIGH);
}
void two() {
digitalWrite(0, LOW);
digitalWrite(1, LOW);
digitalWrite(2, HIGH);
digitalWrite(3, LOW);
}
void tree() {
digitalWrite(0, LOW);
digitalWrite(1, LOW);
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น