-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Teensy 4.1 cannot connect to AS5600 #53
Comments
Thanks for the issue, 0.5.0 Breaking change Long AnswerThe reason to remove the _wire->begin() is that different boards can have different sets of parameters for the begin() function. So I had to refactor the code of the library (and all my I2C ones) to do what is known as "dependency injection". Only pass a reference to a dependency (I2C class) , but do not handle settings of that (I2C) class that also might be dependent of the (I2C) class. So this change makes it explicit for the user what the I2C settings are and where they are set. |
@RobTillaart Let me try to use I2C begin() method of Teensy 4.1 on my Arduino sketch. |
@SquadQuiz |
I have done testing AS5600 library with specific begin() method for Teensy. Here is snippet of code, void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
Serial.print("AS5600_LIB_VERSION: ");
Serial.println(AS5600_LIB_VERSION);
Wire.begin();
as5600.begin(4); // set direction pin.
as5600.setDirection(AS5600_CLOCK_WISE); // default, just be explicit.
int b = as5600.isConnected();
Serial.print("Connect: ");
Serial.println(b);
delay(1000);
} It seems like Wire.begin() method in Teensy doesn't require parameter SDA and SCL pins. |
I'm using this library with teensy 4.1,
I have found some issue on the library version 0.5.1
and the latest version work with my board is version 0.4.1
The issue is I cannot get any data via I2C connection.
After investigation I found something in the PR no. #47
in AS5600.cpp file
So I try restore some code from version 0.4.1 and it's work for my teensy 4.1
Sqk~
Thanks
The text was updated successfully, but these errors were encountered: