-
-
Notifications
You must be signed in to change notification settings - Fork 16
Nano 33 Sense v2: I2c Scanner running for Wire only acting strangely #49
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
Comments
Out of curiosity I loaded up a MPU9250 sensor sketch using the bolderflight library and seems to still work. But don't understand the scanner. Wonder what would happen if I put a second device on wire. Ok later - need coffee. |
I tried to copy in the i2c0 and i2c1 configuration stuff nothing helped. I then looked at the Wire library, and noticed that the begin method does not do anything but initialize the right buffer. So I changed your (@mjs513) sketch like:
Where I called the setting of the clock on Wire and Wire1 and now I see:
@facchinm and ... Secondary note: I tried setting clock to STANDARD and sort of random stuff returned, like groups of every possible ID. |
Quick update on it, I ran the MBED version and runs a lot quicker.
More experimenting to do.
|
NIce @KurtE. Looking at it now and going to try getting wire1 to work. As to your question on setting clock - just looked and agree with you probably should setClock to standard in wire begin as a default. Think I know the reason we have to setclock for sense - for the giga we have a default speed set up in the overlay but for the sense don't believe they do that. Not sure why standard is not working. |
For some reason Wire1 always returned no i2c devices fournd after using changes @KurtE made to the overlay to add the additional pins and i2c1. This morning for the heck of it I added
and it started working using 400k:
not sure where the 0x68 is coming from on wire1. As Kurt mentioned 100k does not seem to work for Wire or Wire1 with the scanner. |
Just updated the device list in the sketch along with pinmode on wire1:
|
The only device I have on wire is a MPU9250.
With the know issue that Wire1 is not defined yet ran the i2c scanner for Wire only and its returning all devices in the scan list as attached:
sketch used:
The text was updated successfully, but these errors were encountered: