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):
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!