Keyestudio KS0436 Kit Manual page 96

Table of Contents

Advertisement

counting function
{
digitalWrite(latchPin,LOW);
shiftOut(dataPin,clockPin,MSBFIRST,a[x]);
a[x]
digitalWrite(latchPin,HIGH);
delay(1000);
}
}
 Single line comments start with
Code Explanation:
of that line is considered a comment.
Comments are a great way to leave notes in your code explaining
why you wrote it the way you did.
 The first thing we do is define the three pins we are going to use.
These are the
int latchPin = 4;
clock and data pins of the 74HC595.
int clockPin = 5;
int dataPin = 2; //define three pins
REV4
digital outputs that will be connected to the latch,
//
and everything up until the end
//display array
96

Advertisement

Table of Contents
loading

Table of Contents