1. Use serial communication to display which pin is lit in the serial monitor. (adjust the timer to change how fast the LED's change to 1 second) Initialize serial event using: Serial.begin(9600); Display in the serial monitor: Serial.println(thisPin); 2. Modify the code so that only the odd pins are lit on the way down, and only even pins are lit on the way up. 7 6 5 4 3 2 7 6 5 4 3 2 3. Modify the code so that the LED's turn on and off in an arbitrary order using an array. Initialize the array using: int ledPins () (2, 7, 4, 6, 5, 3); Turn on the LED's as follows: digitalWrito (ledPins(thispin), HIGH);
没有找到相关结果