Hello all, I hope you are all well and holding it together.
I'm having some problems with using a AMS 5048B rotary magnetic sensor.
https://ams.com/as5048badapterboard
I've got a couple of the evaluation adapter boards and have installed the library from SOS android.
I'm not sure where I'm going wrong but I am having problems getting consistent results with the sensor.
I've tried with a D1 r2 and with a Teensy 4.1 but get the same results.
I've checked and rechecked my wiring and can't find any problems
I'm not sure if I have a hardware or software problem.
I have tried the read_simple_angle example included with the library without making any changes to the code and have connected the AMS board like so:
AMS Board..............................D1....................................Teensy 4.1
5v..............................................5v....................................3.3V
Gnd........................................Gnd...................................Gnd
SCL.........................................D15/GPIO5 (SCL) .............PIN19 (SCL)
SDA........................................D14/GPIO4(SDA)..............PIN 18(SDA)
(This was a lovely table when I wrote the post - and when I edited it- but the forum has altered the formatting soz)
When I open up the serial monitor I get similar results on the D1 and on the Teensy:
Something like this:
Angle degree : 180.9667968750
Angle degree : 180.8789062500
Angle degree : 180.8789062500
Angle degree : I2C error: 2
359.9780273438
Angle degree : I2C error: 2
359.9780273438
Angle degree : I2C error: 2
359.9780273438
Angle degree : 180.9887695312
Angle degree : 180.9008789062
Angle degree : 180.9448242187
Angle degree : 180.9667968750
Can someone give me a bit of a steer as to what the I2C error is all about? and what steps I coudl take to resolve it? I'm just learning about I2C through using these sensors so would very much appreciate a bit of guidance. Longer term I am hoping to use multiple 5048 sensors simultaneously but I definitely need to be able to crawl before I can stumble ![]()
Many thanks
Dave
Thanks in advance

