update on as5040 library

update on as5040 library

I got around to testing multiple chips.
AS5040 x_encoder(2,3,4);
AS5040 y_encoder(5,6,7);
xval = x_encoder.measured_value();
yval = y_encoder.measured_value();
works great.

What doesn’t work (yet) is:
AS5040 x_encoder(2,3,4);
AS5040 y_encoder(2,3,5);

My hope was that I could share data and clock amongst a whole bunch of chips, and just hardwire a line to the chip select of each chip. That doesn’t work, and I’m going to have to do some reading about whether it’s even possible.
However, in the meantime, wiring five AS5040’s (or 5045’s or a mixture) is now much easier.

Leave a Reply

Your email address will not be published. Required fields are marked *