sosandroid / AMS_AS5048B

Arduino Lib for AMS AS5048B I2C - 14-bit magnetic rotary position sensor
Other
48 stars 29 forks source link

Adjust read for repeated start on the Due. #17

Closed gseqBE closed 3 years ago

gseqBE commented 3 years ago

I seemed to have found a fix for this sensor. On the Due, requestFrom() with the below signature needs to be used for repeated start capability.

uint8_t TwoWire::requestFrom(uint8_t address, uint8_t quantity, uint32_t iaddress, uint8_t isize, uint8_t sendStop) 

Added #ifdef _VARIANT_ARDUINO_DUE_X_ for autodetection.

Please confirm with an UNO. I only have a DUO to test.

sosandroid commented 3 years ago

Thanks for this proposal