ASDN-9800 and Leonardo Pro Mini

So I've been trying to connect an ADNS-9800 (not the tindie board but the raw sensor) to a Leonardo Pro Mini for a few days without any luck. I believe the issue to be with my hardware connections:

as for the sketch, I am using the sketch from GitHub - mrjohnk/ADNS-9800: Avago ADNS-9800 Test with other pins:

const int ncs = 19;
attachInterrupt(digitalPinToInterrupt(7), UpdatePointer, FALLING);

I have also switched MISO AND MOSI as well as the Slave Select and Interrupts.

If anyone has any suggestions or ideas I would be thankful.

So I’ve been trying to connect an ADNS-9800 (not the tindie board but the raw sensor) to a Leonardo Pro Mini for a few days without any luck. I believe the issue to be with my hardware connections:

There’s no such thing as a Leonardo Pro Mini. Is it a Leonardo, a Pro Mini or a Pro Micro?

const int ncs = 19;

As you set NCS to 19 I guess you’re using an Arduino with ATmega32U4 CPU. You shouldn’t use these pin numbers but only the symbolic version “A1”, as the pin translations for the analog input pins aren’t fixed, they might change at any time.

attachInterrupt(digitalPinToInterrupt(7), UpdatePointer, FALLING);

This also only makes sense on an ATmega32U4 but in your schematics D7 is not connected. So either the code or the schematics is wrong.

You don’t specify what problems you have. And post the complete code you’re using, the link you posted includes several examples.

The board is a Pro Micro with an ATmega32U4.

You are correct, the schematic is wrong, I have connected D7 to pin 7 of the ADNS-9800. I seem to have missed that.

I did not paste any code since others have seem to have made the example work, so I am guessing that the code is correct. I cant post code due to the 9000 character limit of the forum.

The issue is that I am not receiving any data from the chip. the interrupt never Triggers nor doe the data lines ever have any signals. I am not certain if the laser is even on I couldnt even find an example online of how bright it is supposed to be (it is barely visible).

Thanks in advance

You are correct, the schematic is wrong, I have connected D7 to pin 7 of the ADNS-9800. I seem to have missed that.

Post an updated schematics with a Micro or Leonardo (ATmega32U4). The SPI bus of the these boards is not on D11-D13!

This is the update:

Your code doesn't match the schematics. You connected the CS signal to D9 and not A1. If you changed that too, post updated code! And post complete code.

I have changed the pins so often now in order to get this to work, at the time of creating the schematic, ncs = 9.

Post complete code that matches the schematics! If necessary post updated schematics.

Solved the issue by using a ADNS3050 instead.