I am using ADNS3080 optical flow in raspberry pi 3. I set SPI connection between raspberry and ADNS3080 optical flow. I used spidev library for reading values in python. I want to read delta_x and delta_y position which registers corresponding to 0x03 and 0x04 numbers in datasheet. So I am using this code for reading registers:
import spidev import time spi = spidev.SpiDev() spi.open(0,0) while True: resp = spi.xfer2([0x03, 0x04]) print resp time.sleep(1)
I am taking "0,0" results in every loop. I have checked the connections hardware and there are no problems. What is the reason why I can't read these values?