mcanet/knitic — pull request #13 by thiagohersan (2012-10-26 21:58:19+00:00)
Title: Fixing shift-register code

I'm debugging the shift-register code in the arduino.

I had these lines in there:
`//return the latch pin high to signal chip that it `
`//no longer needs to listen for information`

but the command to actually do those things wasn't there. Maybe it got lost on some merge... but I doubt it... anyway...

I put this line back in and it works:
`digitalWrite(latchPin, 1);`

It seems like there's still an issue. I'm suspicious of these lines:
`//Sets the pin to HIGH or LOW depending on pinState`
`digitalWrite(myDataPin, pinState);`
`//register shifts bits on upstroke of clock pin`
`digitalWrite(myClockPin, 1);`
`//zero the data pin after shift to prevent bleed through`
`digitalWrite(myDataPin, 0);`

It seems like there should be a clock = 0 at some point in there... I'll look!