Optical Flow Sensor - standalone - register reads

Bot_thoughts helped me get this one running with the standalone code found here:

http://code.google.com/p/bt-optical-flow-sensor/

It's happily sending useable streams of pixels to the Arduino.

Strangely enough though, the dx and dy values (for the presumed mouse movement) return zero except sometimes on the very first readout.

I've also tried reading the ADNS3080_PIXEL_SUM register ( super documented code! see also page 27 in the ADNS-3080 docs ) with the result that it transmits a constant value (changing after every power on, though). Viz:

void display_pixel_sum()
{
  byte Pixel_Sum;
  while( !Serial.available() ) {
    Pixel_Sum = read_register( ADNS3080_PIXEL_SUM );
    Serial.println( Pixel_Sum, DEC );
    delay( 300 );
  }
}

I'm puzzled...

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Hi,
    Even i'm working with this code its compiling but in the serial port terminal its not at all getting initialized, can you people please tell me the changes i have to do. Thanks in advance.
  • I'll have to remind myself about the code, but maybe I can try to duplicate the problem...

    How's the focus on your sensor?

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…