74HC595
74HC595
/*
* setup() - this function runs once when you turn your Arduino on
*/
void setup()
pinMode(latchPin, OUTPUT);
pinMode(dataPin, OUTPUT);
pinMode(clockPin, OUTPUT);
/*
*/
void loop()
leds = 0; // Initially turns all the LEDs off, by giving the variable
'leds' the value 0
updateShiftRegister();
delay(500);
for (int i = 0; i < 8; i++) // Turn all the LEDs ON one by one.
updateShiftRegister();
delay(500);
/*
*/
void updateShiftRegister()
digitalWrite(latchPin, LOW);
digitalWrite(latchPin, HIGH);
ERROR
Compiling sketch...
Compiling libraries...
Compiling core...
Using precompiled core:
C:\Users\LENOVO\AppData\Local\Temp\arduino_cache_417381\core\core_arduino_avr_uno_0c81287
5ac70eb4a9b385d8fb077f54c.a
Sketch uses 1072 bytes (3%) of program storage space. Maximum is 32256 bytes.
Global variables use 10 bytes (0%) of dynamic memory, leaving 2038 bytes for local variables. Maximum
is 2048 bytes.