I’ve bought a couple of MA730 14bit magnetic sensors and am intending to use them in SPI mode.
I’m finding that the MagneticSensorSPI class isn’t working great ‘out of the box’ and I’m guessing it really only works with a
AS5047U. By not great - it returns the lower 8bits shitfed up 6bits and some random bits at the end.
I can get the MA730 to work better by borrowing code from:
That library uses SPI_MODE3 instead of SPI_MODE1 and doesn’t send a command to read - it simply listens. It also has a long running spi.beginTransaction()
So I guess the question I’m asking is should ma730 be implemented as a separate sensor class or should MagneticSensorSPI squeeze in logic for both.
As a side note this sensor (and the library above) supports SSI and PWM - both on the roadmap. It also supports incremental encoder output which I think is the mode @David_Gonzalez is using on his older Janus board.