void setup() {
// put your setup code here, to run once:
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
//DDRD = B00000000;
//PORTD = B11111100;
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(2, !digitalRead(2));
delay(500);
digitalWrite(3, !digitalRead(3));
delay(500);
digitalWrite(4, !digitalRead(4));
delay(500);
/*PORTD = B00011100; //Sets only D2 to HIGH
Serial.println(PORTD);
delay(2000);
PORTD = B00000000; //Sets only D2 to LOW (we use ! to invertt the byte)
Serial.println(PORTD);
delay(2000);
*/
}