Go Down

Topic: Easy Shift Register Library (Read 5981 times) previous topic - next topic

(deleted)

Apr 30, 2010, 03:49 pm Last Edit: Apr 30, 2010, 06:39 pm by spycatcher2k Reason: 1
(deleted)

keeper63

Suggestion: new class name.

Binstop says nothing to me about what the library is - I had to read the comments to understand.

A better name would be something like "shiftreglib" or something similar; something generic enough that it could be expanded in the future to allow for use with other shift-register parts (the 74hc595 is one of many such parts), much like the LCD libraries that exist.

Other than that, I think a library like this has been long overdue, and should be placed in the playground.

:)
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

(deleted)


stefanosky

sorry but i don't understand the call
registerWrite(bitToSet, HIGH);

with this signature
void registerWrite(int whichPin, int whichState) {}

bit with pin , and HIGH with int value
thanks


stefanosky

#5
Jul 02, 2010, 05:32 pm Last Edit: Jul 02, 2010, 11:01 pm by stefanosky Reason: 1
ok High is my ignorance of c :), now i undderstand.
so... in the example file
you call
registerWrite(bitToSet, HIGH);
bitToSet is a number

in the function
registerWrite(int whichPin, int whichState)
the number that you pass in, is for wichPin (the number of pin) an not the number to pass througth. why?


---
OK I UNDERSTAND, sorry for the stupid question
----

thanks for the library ;)

marklar

Nice library, thanks for posting.  Your library inspired me to post details on using SPI for really fast shift register control.

You may want to consider SPI either in other projects and/or as an optional feature in your library.

Here is a link to a post I just added that shows how to implement SPI (and seemless PWM control) via 74HC595 shift registers.
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1278251011

I'd be interested in your input as you use may use these more than I do.

Go Up