Hi everyone, i think I am posting in the appropriate section but sorry if it isnt.
For uni I am making a light switch which is controlled by 4 rows of exposed wires (A, B, C, D) acting as capacitive sensors poking up through fake fur. the whole class is based on haptics (touch). i have managed to program it so that when you touch an exposed wire from row A it makes an led light turn onto a low brightness and as you touch the others from left to right the light becomes brighter. Also in order to turn it off you go back over the exposed wires from right to left, the code for this is capacitivesensor beta6. However, I now would love to be able to code it so that after you have continually stroking it from left to right for 5 seconds or more the light starts to flicker like a purring cat as well. I have tried to code it to do this but with the code i have done it only seems to make the light start flickering 1 second after you have patted it or after only giving it one stroke. the code for this is capacitivesensorbeta9. if anyone could provide some help with coding it so that it does what I have said I want it to do then it would be greatly appreciated!!!
CapacitiveSensorBeta6.ino (4.06 KB)
CapacitiveSensorBeta9.ino (4.82 KB)