The FIFO queue functionality of the sparkfun/Qwiic_Button firmware is broken. This bug was reported on Aug 26, 2020 and is still not fixed. The QWIIC button is unusable without the ability to access the button press and button click timestamps in the queue. Each queue holds 15 timestamps. The only way to access a timestamp other than the first or last is to pop the oldest (last) timestamp, however, the popPressedQueue function doesn’t work.
Avoid all of the SparkFun QWIIC buttons and switches. Regrettably, I bought eight of them which are now paperweights.
Note: This is an issue with the QWIIC button firmware, not with the Arduino and Python libraries. If you fix the firmware yourself, you need to spend $40 in parts to reprogram the button / switch.
I tested the fix with a SparkFun SAMD51 Thing Plus serving as the I2C master / controller running the SparkFun_Qwiic_Button_Arduino_Library and an Uno serving as the QWIIC button / switch ATtiny84 running the sparkfun / Qwiic_Button firmware with the four-character fix. If the Uno and ATtiny84 are functionally equivalent, the four-character fix seems to resolve the issue.
Now I just need to figure out I go about getting the firmware on my eight QWIIC buttons and switches upgraded without spending $40 on the Tiny AVR programmer (which is currently backordered), IC test clip - SOIC 8-pin and related materials. Can I mail the buttons and switches back to SparkFun to be upgraded?
To connect that to the qwiic button, I would use a standard 2x3 header and just hold it against the pads on the rear of the button. Pin 1 is the one with the little white line next to it.
It’s extremely disappointing that SparkFun continues to sell QWIIC buttons and switches six months after this bug was reported with not even a disclaimer in the product description. I’m holding out hope SparkFun will do the right thing and offer to “recall” my QWIIC buttons and switches.
Despite my better judgement, I went ahead and ordered the $15.95 Tiny AVR Programmer, $17.95 IC Test Clip - SOIC 8-pin, jumper wires and USB cable extension as recommended by SparkFun to reprogram the Qwiic button / switch ATtiny84 in place,
Of course, the 8-pin IC test clip is intended for an ATtiny45 / ATtiny85. I attempted to use the IC test clip to connect reset, MOSI, MISO and SCK. I attempted to supply power to the button / switch via the Qwiic connector (less SDA and SCL). I also attempted to supply power using a pair of jumpers between the ATtiny45 / ATtiny85 socket on the Tiny AVR Programmer and the button / switch (where 3.3 V and GND are broken out on the side of the board).
Has anyone successfully reprogrammed the ATtiny84 on a Qwiic button / switch? Is it even possible?
I’m getting,
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
I don’t want to spend a lot of time troubleshooting this if it may not even be possible.