This repo contains an arduino program, a python script, and a processing sketch to render the output of an ADNS3080 mouse sensor as a grayscale image. This is ideal for focusing the lens as its obvious when an image is blurry. Doing so greatly improves the SQUAL value and subsequent motion detection.
All the files work in conjunction and must have the same baud rate and begin character. This last value controls when the python script/processing sketch receives information from the arduino.
A properly focused camera should produce these images:
Upload the arduino program to your board of choice and connect the board to the ADN3080. Afterwords, run either the python script or the processing sketch.
-
Use the processing IDE to run the sketch.
-
If using linux, the python script can be executed by opening a terminal in the location of the python script and running the command:
python3 adns3080_pixel_view.py
NOTE: While the Arduino program was written for an Arduino Uno/Nano, it should work with other boards without much issue.
- The Arduino sketch makes use of the ADNS3080 library.
If using Python:
- The python script uses python 3
- The script requires the pyserial library.
- The script requires the tkinter library.
If using Processing:
- The Processing IDE software: Download
Credit goes to:


