Serial monitor problems arduino 1.6.13/ teenly lc

100

Member
I just spend half a day trying to figure out why my custom teensy lc based board had trouble with usb connections but then realised that im having the same issues with a standard teensy lc. Im using arduino version 1.6.13 and its on a new computer. Previously ( old computer) i never had any problems. Is this a known thing i could see some other people with a similar problem but no solutions posted?
 
I dont see a specific problem listed or any included code, usually, in order to fix a "problem" it has to exist. What exactly, is the problem?

" Forum Rule: Always post complete source code & details to reproduce any issue! "
 
There was another recent thread with similar issue... No specific fix, but reading it might give ideas to try. It may also gives ideas on indicating more specifically what you tried, your environment and how the failure presents
 
To be more specific in the problem it will sometimes work but most of the time not , the code is still running on the board as the led keeps flashing but nothing is printed on the serial monitor . The code its self is just a the basic analog read serial write example. I have read through the other thread but couldn't find a solution although most likely like suggested there something on this computer might be blocking it.I might just upgrade arduino to the latest version and hope for the best. I thought this might have been a known thing i couldnt find
 
That's a bit more info:: no problem programming or running - but using the IDE serial Monitor - the output is only working occasionally?

The IDE SerMon is flakey - at least for me. When I have to use and it won't connect - I close the SerMon window and click the SerMon icon on the IDE again and that has it reconnect typically. Given a choice - I use TYQT because it is much better about reconnecting whenever a Teensy is connected and presenting a USB/Serial or even HID interface.
 
I might just upgrade arduino to the latest version and hope for the best. I thought this might have been a known thing i couldnt find

Well, there is a known problem where 1.33 doesn't install/update the serial driver on some Windows 7 & 8 machines. The 1.34-beta installers fix this issue. There's also a mysterious problem that sometimes comes up with Macs. Missing driver on Windows results in no serial monitor communication, but you can still upload (all uploading is done by HID protocol, not serial). The Mac mystery causes partial data loss, but some/most of the data Teensy sends does seem to end up in the serial monitor.

But we can't tell if you're running on Mac, Linux or Windows, and if Windows, whether you've got 7, 8 or 10. We have no clear idea of the problem you're seeing, only "will sometimes work but most of the time not". We can't tell if your problems are only with getting text into the serial monitor, or if uploading code is also problematic. I want to help you, but you're really keeping all of us in the dark which makes it almost impossible to offer any helpful troubleshooting advice. Hopefully this first paragraph at least answers your question.

If you want useful help, you really need to understand this isn't how we do things here. You can see in many prior threads we have a pretty good history of figuring out problems on this forum, but the process involves posting very clear and complete info about what's really going wrong. We can't see your screen and can't know exactly what steps you're trying, unless you show us. It's important to SHOW us (as opposed to merely telling us) what you're doing and really seeing, because the insight into problems almost always depends on the small details.
 
ok details are as follows
windows 10 on msi gs73
arduino 1.6.13
teensy lc
I have no problems up loading code
when i try and use the serial monitor it does not show data most of the time ever though at the top it says " teensy monitor com6 online" although some times when i open the serial monitor it is just a blank box with nothing in it.
Once it has shown com6 twice in the available com ports list,
Sometimes it all works as it should
I also have trouble closing the serial monitor ,it needs to be clicked many times and takes a while to close



here is the code i was testing it with
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
float voltage = sensorValue * (5.0 / 1023.0);
// print out the value you read:
Serial.println(voltage);
}
 
Last edited:
IIRC, the Teensy LC pins are NOT 5V tolerant. That means that you should not feed more than 3.3V into A0.

Independent of that, it might be that the Teensy LC is just too quick for your Windows when starting the serial communication.

I'd increase the baud rate with "Serial.begin(57600);" and then wait until the Windows serial is awake with "while(!Serial);" before moving on.
 
Last edited:
Thanks for the tip but that was just a sketch i used to test the problem that we all know works , the teensy isnt actually measuring anything but a floating pin.
 
Theremingeniur is right, the teensy boots up way too fast to most of the time get serial prints from the setup function to appear in the serial monitor, use his example while(!Serial); however, it's blocking until you use the monitor, you can use this method in setup after Serial.begin

Code:
void setup() {
Serial.begin(115200);
while(!Serial && millis() < 5000 );
}
 
Most of these simple demo sketches come from the Arduino world, where people play around with old and outdated 8bit AVR processors. Most Teensys (LC and 3.x) have much modern and faster 32bit ARM processors, thus, such simple code needs sometimes a handbrake added...
 
good idea , but i just added a 200ms delay and it was still very inconsistent , the time showing nothing then taking about 30 seconds to close the serial monitor.
 
I'm running your program (message #8) on a Teensy LC here, using Windows 10 and Arduino 1.6.13 and Teensyduino 1.34-beta3.

Here's what I'm seeing on my screen. The numbers scroll very rapidly.

Capture.PNG
(click for full size)


the time showing nothing then taking about 30 seconds to close the serial monitor.

I don't understand what you mean. What is "showing nothing"? Can you post a screenshot (as I just did for you).

What does "taking about 30 seconds to close the serial monitor" really mean? When I click the close "X" in the upper right corner of the serial monitor window, the window disappears pretty much instantly. Is there really a 30 second lag from the instant you click that button to when the window vanishes from your screen? Or maybe you mean something else? If so, please understand we can't see your screen and don't know what things you are clicking or typing. Please be specific about exactly what you are doing and exactly what you're observing. Small details can matter greatly.
 
Yet another blind guess... try disabling all wifi and bluetooth on your PC. 30 seconds is suspiciously similar to wireless discovery times. Maybe there's some not-so-great wireless driver on your PC that tripping up how the Arduino software does stuff (like detecting ports)?
 
Last edited:
Thanks for helping guys but now its all functioning perfect with the same teensy/ computer/usb/code. I dont really know much about this stuff but im guessing it was a driver like paul said in the last comment, windows must have done something about it. This computer seems to be constantly be fixing things since i got it like the speakers wouldnt work for the first few days then they would only work on the right and now they work ok but no bass but im at about 3 weeks now and thought it would all be fine.
 
Which proves once more that Windows is not a trustworthy environment when you want to do software development on a serious level...
 
...
I'd increase the baud rate with "Serial.begin(57600);" and then wait until the Windows serial is awake with "while(!Serial);" before moving on.

Looking in usb_serial.h at this line: void begin(long) { /* TODO: call a function that tries to wait for enumeration */ };
I get the idea that Serial.begin() doesn't care what is passed - and when compiled with USB - .begin() isn't needed for Serial to come online as USB speed.

Which proves once more that Windows is not a trustworthy environment when you want to do software development on a serious level...
SPAM
 
I had a problem with bringing up the Arduino IDE build in monitor. No matter what I tried I got a "port already in use". This started to happen after I upgraded to Arduino 1.8.0 and Teensyduino 1.34. I had the problem with both a Teensy 3.1 and a teensy 3.5. I also try to use other programs (like Realterm) and had the same problem that the port already in use. Programing the teensy code worked fine. Finally I program the teensy USB as serial and MIDI instead of just serial and Every thing was fine. When back and try Just USB serial only and the problem came back. Do not understand but it works .
 
No matter what I tried I got a "port already in use".

Is this Windows, Linux or Mac? Which version?

When you select the port in Tools > Ports, it there anything printed after the port name, like which type of board it is? For example, here's how things look on Linux. Notice the port name has "(Teensy)" printed after it...

screen.png

What do you see on your screen? Maybe post a screenshot, so we can see what you're seeing...
 
I am using Window 10

The COM3(Teensy) is how it shows up in IDE

After I program it with Serial - Midi it show up on COM14(Teensy) and Every works right.

Attached:
1. The Screen I get when I first program it (From Serial to Serial + Midi)
2. Screen when trying to use the Monitor when programed with just Serial
3. Board info when programed with Serial.
4. Arduino IDE Info
5. Windows info
6. Realterm trying to use the port.
i
 

Attachments

  • Open Monitor.jpg
    Open Monitor.jpg
    25.2 KB · Views: 98
  • Board Info.PNG
    Board Info.PNG
    5.5 KB · Views: 107
  • Program.jpg
    Program.jpg
    56.6 KB · Views: 115
  • Realterm.PNG
    Realterm.PNG
    10.3 KB · Views: 103
  • system.PNG
    system.PNG
    57.4 KB · Views: 138
  • Ver software.PNG
    Ver software.PNG
    17 KB · Views: 99
Does it only do this when you try to monitor in RealTerm (which I assume you are doing from the last post), or also when you try to use the Arduino Serial Monitor? I would suggest to try closing all applications, opening JUST arduino/teensy loader and trying to connect with the Arduino Serial Monitor. Multiply applications cannot access the same serial port at the same time.
 
I have the problem with Arduino Serial monitor too. All other application are close except the Arduino IDE. But programing the teensy with Midi Serial Option everything works fine. Adding the midi does change the com port number which may be part of the answer.
 
Back
Top