I'm having issues using the digital inputs of an Arduino Duemilanova into Pure Data.
I'm using a photodiode with a 1M potentiometer configured like this:
Arduino +5v -> Cathode-[Photodiode]-Anode -> Arduino Digital In -> 1M potentiometer -> Arduino Ground
(The digital in is connected to both the photodiode anode and the 1M potentiometer)
And then I have the pduino standard firmata 2.1 loaded into the Arduino.
Now this kind of works. But I'm trying to use the photodiode as a sort of tachometer. Every time light hits the photodiode, send a 1, no light: 0. This works if I do it slowly. But the faster I flicker the light on and off the photodiode, the digital toggle box doesn't register many or even most of the flashes, YET the TX LED on arduino keeps flashing perfectly, so it seems the data is being sent. It just seems like somehow the connection between the arduino and PD, is somehow choking. Any suggestions?