TinyCircuits / TinyCircuits-Thumby-Lib

C/C++ library for Thumby!
Other
10 stars 0 forks source link

Examples do not work with current Arduino IDE (2.3.2) and Pico SDK #2

Open tmcintos opened 5 months ago

tmcintos commented 5 months ago

When running the examples using current software, installed following instructions at https://thumby.us/CCPP/Environment-Setup/, nothing happens after upload: the screen is black, the buttons do nothing, there is nothin on the serial console.

If I instead upload a simple sketch like the following, then I get the expected output on the serial console:

void setup() {
  // put your setup code here, to run once:

  // Init duplex UART for Thumby to host comms
  Serial.begin(115200);
}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.println("hello!");
}

Simply adding thumby.begin() at the start or end of setup() is enough to break the operation of this sketch (no serial output, anyway).

I investigated a little and found that it seems to be the SPI.begin() call that causes there to be no serial output; by omitting that I was still able to execute the thumby.begin() code and still have output on the console.

Looking at https://arduino-pico.readthedocs.io/en/latest/spi.html, I'm wondering whether perhaps the Pico SDK's SPI implementation has changed in an incompatible way that has broken the Thumby display code? I don't know enough about how this is all implemented, unfortunately, and don't have time to investigate in depth.

maxgerhardt commented 2 months ago

Same thing noticed in https://community.platformio.org/t/black-screen-after-uploading-file-on-thumby/41947/13?u=maxgerhardt. Arduino-Pico core 2.2.1 seems to still be working, possibly slightler newer versions too, but not the latest 3.x.