Shift Register


I'm trying to build a carpet of 50 pressure pads sensors using and Arduino and Processing. In order to do that I'm using a shift register (TEXAS INSTRUMENTS model CD4021BE), but I dont know how to write the Arduino code to read the data from the register.

Untill now, I found and example in "Physical Computing" book, using the same shift register but with an example code for basic stamp or pic basic and BX-Basic.

I'm stucking with a way of doing the Shift in....

Can anyone help? please!!!!!!!!!!!!!!!!!!!! Carolina Briones

It sounds like you need to be using quite a few analog mux IC's. You'd scan through them looking for a change. You'd be hard pressed to get enough pins on the arduino to run that many without expanding the digital IO as well.

This will run 8 of the pads and eat three digital pins for the address.

PulseIn flat out sucks as a command. Try and avoid it.