Thats great thanks PWillard, now i'm having a little trouble actually getting it working though so i will explain what i have done to try and make it count.
I have an Arduino Mega 1280 By the way.
I have connected the following
Latch to Pin 22
Clear to Pin 23
Pulse to Pin 24
The code i am using is below
const int Latch = 22;
const int Clear = 23;
const int Pulse = 24;
void setup() {
pinMode(Latch, OUTPUT);
pinMode(Clear, OUTPUT);
pinMode(Pulse, OUTPUT);
digitalWrite(Latch, HIGH); // set the LED on
delay(500);
digitalWrite(Clear, LOW); // set the LED on
delay(500);
digitalWrite(Clear, HIGH); // set the LED on
delay(500);
}
void loop() {
digitalWrite(Pulse, LOW); // set the LED on
delay(500);
digitalWrite(Pulse, HIGH); // set the LED on
delay(2500);
}
I am simply trying to get it to count up to 5. But it seems to just show random numbers sometimes

. Is there something i am doing wrong?