becoming more familiar to the arduino uno. memorized chapters and always attempted to double compile other steps from the arduino uno REV3 starter kit to further understand how to write.
chapter 12 talks about the shift register
all i wanted to do was figure out how to write in a Serial.print within the actions from program in chapter 12
using shifter register chapter 12, can i define SERIAL DATA OUTPUT pin 9 on shift register to an input analog on arduino uno
and read serial printing from shift register? it would require what below?
original chapter 12 program sketch
//
int datapin = 2;
int clockpin = 3;
int latchpin = 4;
byte data = 0; //global variable for shift register
void setup()
{
pinMode(datapin, OUTPUT);
pinMode(clockpin, OUTPUT);
pinMode(latchpin, OUTPUT);
}
void loop()
{
binaryCount();
}
void shiftWrite(int desiredPin, boolean desiredState)
{
bitWrite(data,desiredPin,desiredState);
shiftOut(datapin, clockpin, MSBFIRST, data);
digitalWrite(latchpin, HIGH);
digitalWrite(latchpin, LOW);
}
void binaryCount()
{
int delayTime = 1000;
shiftOut(datapin, clockpin, MSBFIRST, data);
digitalWrite(latchpin, HIGH);
digitalWrite(latchpin, LOW);
data++;
delay(delayTime);
}
//and adding pictures from my phone do not seem to be helping much.
//i was hoping to show a program sketch from vilros ultimate starter kit
//and hoping to add serial messaging.
sorry for newbing up the place with newb stuff.
i added the sketch from chapter 12 here and below in comments the complete usk guide book.
the sketch opens with arduino but ask again to open in its own sketch i click ok and it opens in the sketch window.
i know all the material is here and can be opened in the sketch compiler right from the forum.
thank you for your time.
Circuit_12.ino (10 KB)
