pnegre / python-whiteboard

Linux whiteboard in python
http://wiki.github.com/pnegre/python-whiteboard/
GNU General Public License v2.0
117 stars 23 forks source link

IR Pulse Detection #5

Closed Sycro5 closed 12 years ago

Sycro5 commented 12 years ago

I'm working on getting python-whiteboard to detect pulsing of an IR LED at a specific frequency. I need to distinguish between solid IR data and pulsing IR data. At the moment, the callback function below (from Cursor.py) is called whenever IR data is available. Do you know what sampling rate the wiimote reads data, and how often this method is called if there is a solid IR LED in view? I'm trying to find the sampling frequency of a solid LED and distinguish it from a pulsing LED. Unfortunately, if I print time.time() whenever this callback method is called I can't seem to get a consistent frequency. Any ideas how I can distinguish a fast pulse from a solid LED?

Cursor.py

'#' This function fabricates the callback function that is to be '#' passed to the wiimote object. It's called every time that IR data '#' is available. It is necessary to do it this way because the callback '#' has to be aware of the cursor object. def makeCallback(self): def callback(q):

Thanks a lot!