sparkfun / Qwiic_Twist

A digital RGB encoder controllable and readable over I2C.
https://www.sparkfun.com
Other
3 stars 2 forks source link

Steps for Flashing Updated Firmware #8

Closed robfrawley closed 3 years ago

robfrawley commented 4 years ago

Are there any resources that detail the programming process for this board. I bought a Twist only two months ago from Sparkfun and it appears to only have the v1.0 firmware (which, importantly for my usage, is lacking the "limiting" functionality. I have no experience with ATtiny whatsoever. I have been unable to find a detailed resource as to programming the Twist with the latest firmware, and do not think I have the proper hardware, either (I am also slightly annoyed that it appears I need to spend $15 buying an ATR Programmer for a product that should have shipped with the updated firmware, to begin with). Any thoughts? Thanks!

robfrawley commented 4 years ago

Further details and additional possible discussion can be found on the SparkFun forums at https://forum.sparkfun.com/viewtopic.php?f=105&t=53179.

nseidle commented 4 years ago

Hi Rob - sorry for the frustrating experience. We don't currently have a good document on upgrading the Twist.

Did you run the Ex11 to verify the version number? We've been on v1.2 for over a year now. It's not impossible that you got v1.0 but definitely head scratching.

robfrawley commented 4 years ago

@nseidle The way I discovered that my Quiic Twist was running v1.0 firmware (and realized the "limit" functionality was not available due to this) was actually by running Example 12 (Set Limit), which itself calls the getVersion() library function; it performs a version check to confirm API compatibility before querying the setLimit() and getLimit() API endpoints:

int currentVersion = twist.getVersion();
if (currentVersion < 0x0201) { //v1.2 in two byte form
  Serial.print("The current firmware version is: ");
  Serial.print(currentVersion & 0xFF);
  Serial.print(".");
  Serial.println(currentVersion >> 8);
  Serial.println("This feature is not supported. Please consider upgrading the firmware on your Qwiic Twist. Freezing.");
  while (1); //Freeze
}

I thought nothing of the version check conditional from Example 12 when I pasted it into PlatformIO IDE and clicked "upload", I was only trying to determine how I was misusing the (get|set)LimitAPI endpoints (as they were not working in my own code), but to my surprise, the console monitor for Example 12 output that I was on firmware v1.0, provided the "unsupported feature" warning, and subsequently froze.

I don't suspect this is a regular issue either; I've ordered countless components from SparkFun over the years and this is the first instance where I've received a product with such an out-of-date firmware. Hopefully, you guys can provide some guidance on how I should proceed. I have not yet purchased the "Tiny AVR Programmer" or any other components, so I would also really appreciate any recommendations for resolving this issue in the cheapest manner possible. Thanks for the timely response! All the best.

robfrawley commented 4 years ago

@nseidle Any thoughts?

JimmyBlunt commented 3 years ago

Is there any progress on that issue. Just the steps with a short description how to get the firmware updated would be really handy. I'm struggling too and just can't find any helpful documents that describe this in detail. T

nseidle commented 3 years ago

I am sorry this took so long. I have tons of excuses but they are merely excuses.

Please have a look at the programming instructions. Please open new issue if anything doesn't make sense.