Due to high demand expect some shipping delays at this time, orders may not ship for 1-2 business days.

CLUE and Arduino Serial Monitor problem
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

CLUE and Arduino Serial Monitor problem

by liquidsquid793 on Sat Mar 06, 2021 1:47 pm

Ok, the root of why I looked for a different dev environment was I couldn't get the console in Arduino to work reliably, and I was blaming it on the GUI. It turns out my Clue board communications on the serial port do not work well during the setup() unless I put in a waitForKey() function forcing a button press before the important messages I need to see. Not sure what is going on, but it seems the clocks on my board are not stable for a while after reset, so the serial traffic is not at the baud it should be until things settle.

I only get approx 1 in 3 messages onto the console during startup with the clue_test() app until I waited for a key. A delay would likely do the same thing, haven't tried yet.

Not having a functional console is definitely hard to debug when you are trying to initialize external sensors in setup().

So going to use Code for dev work, the Arduino for build/update. Just cannot figure out the nuisances of getting Visual Studio Code set up for the Clue and the arcada_clue_test() app until someone more familiar with both than I am puts up a tutorial. It is all of the environment defines and includes that is stumping me.

For reference, this is what I put into the setup() section that allowed me to see my messages. Hopefully this helps others if they have this issue.

Code: Select all | TOGGLE FULL SIZE
  Serial.println("Arcada display begin");

  uint8_t pressed_buttons = arcada.readButtons();
  //Wait for button press to begin...
  while ((pressed_buttons & (ARCADA_BUTTONMASK_A | ARCADA_BUTTONMASK_B)) == 0)
    pressed_buttons = arcada.readButtons();
  for (int i = 0; i < 250; i += 10) {

I don't get ANY message to the console before my wait for button (No message of "Arcada display begin"), but all after it.

So this is something to note if Adafruit needs a fix to the demos. The untouched demo does the same thing with the built-in console. It could even be the dev environment, dang tough to prove.

In a perfect world, the PuTTY console would be integrated, giving us serial port gurus a real console with all the bells/characters/whistles.

Posts: 25
Joined: Sat Feb 27, 2021 4:16 pm

Please be positive and constructive with your questions and comments.