Hi Thanks again for your answer.
I'm amazed about how fast people reply in this community ![]()
I'm using this component: ADNS2610
So it's maybe not an SPI component, sorry I'm really newb on this topic ![]()
here's the datasheet of the component:
And I also attached a picture of it.
Based on that can you explain once again how this code can write the adress of a register we want to read?![]()
pinMode (_sdioPin, OUTPUT);
for (; i>=0; i--)
{
digitalWrite (_sclkPin, LOW);
digitalWrite (_sdioPin, address & (1 << i));
digitalWrite (_sclkPin, HIGH);
}
the register adress is 0x03
so is it because we set up the pin sdioPin (Data) to output before calling digitalWrite that the component knows he has to listen the bit for the register we want to read??
Thanks in advance ![]()
