Capsense with Shift Registers

Does anyone know how to use the Capsense Library with shift registers?

I've set up the Capsense library and made sensors that work.

And I've made this happen with LEDs: arduino. cc/en/Tutorial/ShiftOut

but I don't understand how to integrate the two, especially at the beginning of my code, where I declare the capsense pins, for example:

#include <CapSense.h>

CapSense cs_2_19 = CapSense(2,19);
CapSense cs_2_18 = CapSense(2,18);
CapSense cs_2_17 = CapSense(2,17);
CapSense cs_2_16 = CapSense(2,16);

Do I put a 19 in there? where is that on the shift register? Is the 2 then an Arduino pin 2 or a shift register pin 2? Because when I tried this, although I didn't get any sensing at all, I could get an LED to light up at the shift register's pin 2, just by declaring this at the top.

I found this: arduino. cc/cgi-bin/yabb2/YaBB.pl?num=1272454003 so apparently there is someone working with capsense and shift registers, and is declaring it like "CapSense(2,19)" but I wasn't fully able to understand how it was all working.

I'd appreciate any help!

but I don't understand how to integrate the two, especially at the beginning of my code, where I declare the capsense pins, for example:

You can't mix those two easily. Setting the pins to some new, higher value won't work, the library is written to access Arduino pins only.

You will get away with replacing the output pin with a pin on a serial to parallel chip or a multiplexer, but you will have to modify the library to make that work. You might also get away with replacing the input pin with some type of analogue multiplexer, but check first if the timing for reading works with the desired circuit.

The way you asked those questions these adaptations are probably beyond your level of experience with programming. If you want to try it anyway, Capsense.cpp is the place to start.

Korman