Hi everyone,
I asked a question few days ago but I wasn't able to clearly explain what I wanted to do.
So I just wanted to ask if this line of coding would work.
int pin0 = 0; int pin1 = 1; int pin2 = 2; int pin3 = 3;
void setup() {
pinMode(pin0, OUTPUT);
pinMode(pin1, OUTPUT);
pinMode(pin2, INPUT);
pinMode(pin3, INPUT);
}
void loop() {
digitalWrite(pin0, HIGH);
digitalWrite(pin1, LOW);
delay(1000);
pinMode(pin0, INPUT);
pinMode(pin2, OUTPUT);
digitalWrite(pin1, HIGH);
digitalWrite(pin2, LOW);
delay(1000);
pinMode(pin1, INPUT);
pinMode(pin3, OUTPUT);
digitalWrite(pin2, HIGH);
digitalWrite(pin3, LOW);
delay(1000);
pinMode(pin2, INPUT);
pinMode(pin0, OUTPUT);
digitalWrite(pin3, HIGH);
digitalWrite(pin0, LOW);
delay(1000);
pinMode(pin3, INPUT);
pinMode(pin1, OUTPUT);
}
Thank you,
Gun