void setup() {
// put your setup code here, to run once:
DDRC = B11111111; // Pins 30 to 37
}
void loop() {
// put your main code here, to run repeatedly:
static bool direction = false;
static byte b = B00000001;
PORTC = b;
if (!direction) {
b = b << 1;
}
else {
b = b >> 1;
}
if (b == B10000000) {
direction = true;
}
else if (b == B00000001) {
direction = false;
}
delay(100);
}