Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Serial connection disabled from one revision to the next

  1. #1
    Junior Member
    Join Date
    Oct 2019
    Posts
    3

    Serial connection disabled from one revision to the next

    Hello teensy people,

    In the interest of making this question as scan-able as possible:

    0. This code works where this does not.
    1. You can reproduce this with no hardware beyond a single Teensy 4.0
    2. I am on Windows 10
    3. This code works as expected:
    Code:
    void setup() {Serial.begin(9600); } void loop() { Serial.println("test"); delay(200); }
    4. I am using PlatformIO, though the Arduino IDE refuses to connect as well.

    --

    In longer form, while programming I've come across a side effect of a revision of mine that I don't understand. With seemingly minor changes, the most recent version of what I'm uploading to the teensy no longer interacts with my PC. Indeed, automatic programming also breaks, and upon opening the serial monitor, I'm greeted with a "
    Code:
    could not open port u'COM3': could not open port u'COM3': WindowsError(2, 'The system cannot find the file specified.')
    " error.

    The most significant changes are in the Keyboard.cpp file, and that's what I suspect is breaking things. I am trial-and-error'ing my way through every line, but I imagine I won't learn all that much from that approach. If you'd like to build this code yourself, the library not included in my repo is this observer template one.

    Thank you kindly for any insights as to what's going on.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,133
    Quote Originally Posted by StockHuman View Post
    though the Arduino IDE refuses to connect as well.
    Can you share a (hopefully much smaller) program meant to simply copy & paste into Ardiuno to demonstrate the problem?

  3. #3
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,412
    Quote Originally Posted by StockHuman View Post
    Hello teensy people,

    ...
    Thank you kindly for any insights as to what's going on.
    Not indicated is what version of TeensyDuino is in use? If 1.48b1 then trying 1.48 Beta 2 might show different behavior.

  4. #4
    Junior Member
    Join Date
    Oct 2019
    Posts
    3
    Thank you both for your swift replies!

    Code:
    void SynthEngine::setup() {
      AudioMemory(20); // upped from 10
      waveform.begin(WAVEFORM_SINE);
      waveform.frequency(440);
      waveform.amplitude(0);
    }
    I was wrong in my assumption that the keyboard.cpp changes were the culprit. Seemingly increasing the audiomemory of the sketch fixed the serial comms issue. Is it policy here to delete one's threads once solved?

    On an unrelated note: The Teensy platform is so great, hardware and community.

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,412
    Quote Originally Posted by StockHuman View Post
    Thank you both for your swift replies!

    ...
    I was wrong in my assumption that the keyboard.cpp changes were the culprit. Seemingly increasing the audiomemory of the sketch fixed the serial comms issue. Is it policy here to delete one's threads once solved?

    On an unrelated note: The Teensy platform is so great, hardware and community.
    Glad the solution was found.

    Forum searching isn't great - but leaving the issues discovered by one poster may very well hope another so threads just survive with that goal in mind.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •