#include <Stepper.h>
void setup() {
// put your setup code here, to run once:
DDRD = B11111111;
}
void right(){
for(int x = 0; x < 6; x++) {
PORTD = B00000001; delay(10);
PORTD = B00000010; delay(10);
PORTD = B00000100; delay(10);
PORTD = B00001000; delay(10);
}
}
void left() {
for(int x = 0; x < 6; x++) {
PORTD = B00001000; delay(10);
PORTD = B00000100; delay(10);
PORTD = B00000010; delay(10);
PORTD = B00000001; delay(10);
}
}
void loop() {
// put your main code here, to run repeatedly:
right();
delay(1000);
left();
delay(1000);
}