I tried bringing this up a few times in the past, but since a new release is on the horizon and I saw a post from Kevin that he wanted bug reports, I’m going to try again here.
Yes, this is the wrong forum. Github points people trying to create issues here. The “Developers” forum here specifically states it’s not for bug reports when you start a new draft.
I don’t see a more appropriate forum here for bug reports… please point me in the right direction if I’m missing something obvious.
In the commit below commit, you can see that the check to see if the Pico is initialized is deleted.
if not self.is_initialized():
self.initialize()
The result of this deletion is the first time you try and access the chip (following the documentation) using ACCELEROMETER_QUERY, it fails with an error.
It is initialized after this first access, so all subsequent accesses succeed.
This is 100% repeatable including in the most recent code (I just re-tested it multiple times).
This does not happen with the release immediately preceding the above commit.
If you’d like to see for yourself, that commit is:
Note that I am not the only one seeing this bug. I still get replies to my posts on Reddit from 2 years ago thanking me for the workaround.
My thread:
https://www.reddit.com/r/klippers/comments/owqvo2/raspberry_pi_pico_as_a_secondary_mcu_for/
Someone else’s thread that I commented in:
https://www.reddit.com/r/klippers/comments/tr0r8c/invalid_adxl345_id_got_0_vs_e5/
In practice, this is what it looks like from a terminal when you run it twice back to back (it’s not bad wiring):
Send: ACCELEROMETER_QUERY
Recv: // Invalid adxl345 id (got 0 vs e5).
Recv: // This is generally indicative of connection problems
Recv: // (e.g. faulty wiring) or a faulty adxl345 chip.
Recv: !! Invalid adxl345 id (got 0 vs e5).
Recv: ok
Send: ACCELEROMETER_QUERY
Recv: // accelerometer values (x, y, z): 5329.482782, 52630.760713, -6217.729913
Recv: ok
Again, the first query after a firmware restart always fails, and all subsequent queries succeed.
Another user confirmed it here (in the bottom of his post, the summary doesn’t show it):
As did another user further down the discussion.