// // This program moves five lights from right to left across 8 LEDs // connected to Port 1, pins 0 through 7. // int train = 0b11111; int x = 0; void setup() { P1DIR = 0b11111111; } void loop() { P1OUT = (train << x++) >> 8; x %= 16; delay(100); }