Closed frippe75 closed 1 year ago
Direction pin floating was an issue here https://github.com/Seeed-Studio/Seeed_Arduino_AS5600/issues/3
I will give that a try
Looks like that was the issue. I had connected a jumperwire from dir_pin to a ESP32 pin without defining it as an output or set the direction. So .... My bad.
This is a simplified template, feel free to change it if it does not fit your case.
Describe the bug Using version 2.3.0 via library manager in Arduino IDE. Connecting to a AS5600 magnetic encoder via I2C and I see a constant spike in the values. Ran another AS5600 library and the reading is superstable so dont expect this to be hw related. Just switching from sketch1 -> sketch2 and the issue goes away.
Describe the hardware setup For us it is very important to know what is the hardware setup you're using in order to be able to help more directly
IDE you are using
Tried the Getting started guide? - if applicable Copied the last example from https://docs.simplefoc.com/magnetic_sensor_i2c
Readings are stable for about 20-50 readings then a single reading 50 degrees of and the velocity spikes as well. I'm only testing the sensor portion so no motor connected.
Readings on serial monitor:
Running a different example sketch from the Arduino AS5600 library everything is stable https://github.com/RobTillaart/AS5600/blob/master/examples/AS5600_position/AS5600_position.ino