I am trying to count a square wave on a Raspberry PI.
I tried a variety of approaches: http://abyz.co.uk/rpi/pigpio/examples.html (Freq counter 1 and 2) http://www.dnacoil.com/tools/measuring-light-intensity-with-the-tsl-235-and-a-raspberry-pi/#comment-2850
Both approaches seem to top out around a frequency of 300 which is not useful for direct light conditions .(Ok for low light.)
Data sheet of sensor: TSL235
Is there a better method for getting a square wave, 50% duty cycle on the PI