-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
serialEvent does not work with Leonardo (USB CDC Serial) [imported] #206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have this issue with Arduino 1.0.3 on Windows, using a Leonardo R3 Board. |
Same here. Arduino 1.0.3 Windows, orig. Leonardo R3 |
Are there any news about that bug? |
It seems this simply not implemented. Looking at the 1.5.x branch (but I think it's the same for 1.0.x), this feature is implemented by It should be fairly easy to add this, though. Only thing that might be tricky is to detect inside main.cpp wether CDC is available, but we could always use a weak reference to detect it at runtime. |
No progress on this bug in ~4 years? |
I described a fix ~4 years ago, but nobody seemed to be interested in: http://forum.arduino.cc/index.php?topic=152479.0 |
I think we dont need a fix and just remove this feature, as serialevent is just soo useless, as it is called inside the loop. |
serialEvent() does not work on the ATmega32U4 boards. Reference: https://github.com/arduino/Arduino/issues/1031
serialEvent() does not work on the ATmega32U4 boards. Reference: https://github.com/arduino/Arduino/issues/1031
Fixed (or, better, documented) by arduino/Arduino@e180b70 . |
If serialEvent is depreciated, maybe users could be advised not to use it on these pages? |
I happened to spend (waste) several hours now just to figure this out... I see no logical reason for it to work with some Arduinos and not this one, hence it not being implemented was very confusing. But I guess this is to be expected with the low quality of most of the standard Arduino libraries... |
Not sure I agree with your general code quality assessment. But I do believe designing public APIs with weak linking of function names is a poor practice. The really hard thing about public APIs is once you've published to a wide audience and people write code on top of those APIs, removing them hurts a lot of people even if you later realize a better way. Looks like Arduino did update the primary documentation. |
However, this old tutorial page could really use an update to mention which boards do and don't support serialEvent. https://www.arduino.cc/en/Tutorial/BuiltInExamples/SerialEvent If it really is going to be depreciated, might be good to update the reference and tutorial to recommend against using serialEvent? @per1234 - How do we request documentation updates these days? |
@PaulStoffregen the If someone submits specific recommendations for improving/correcting the Tutorials pages (with the exception of the "Hacking" section as I don't have access to the source of that content), I'll submit a PR to implement those changes if I'm in agreement and am able to personally verify the information is accurate. I'm not the one to make decisions regarding deprecation though. |
I would recommend 2 specific changes to that tutorial page. 1: Add "serialEvent() is not compatible with the Esplora, Leonardo, or Micro" somewhere on the page. 2: In the first sentence, change "SerialEvent()" to "serialEvent()". It should not be capitalized. |
Thanks for your recommendations @PaulStoffregen!
I did a survey of the situation and decided that the best approach is to completely document As the first step, I have submitted a PR to fully document the situation on the Arduino Language Reference's Once I have received an approval on arduino/reference-en#800, I will then submit a PR to add a link to that information to both the serialEvent() tutorial page and the comment in the built-in "SerialEvent" example sketch associated with that tutorial.
I have submitted a PR to correct this. (UPDATE: it has now been merged!) |
This is Issue 1031 moved from a Google Code project.
Added by 2012-09-03T19:30:50.000Z by pilot...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Original labels: Type-Defect, Priority-High, Component-ATmega32U4
Original description
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Expected: Get back what I typed
Actual: Got nothing back
What version of the Arduino software are you using? On what operating
system? Which Arduino board are you using?
Arduino 1.0.1 on MacOS X 10.7.4 with a Leonardo R3 board
Please provide any additional information below.
I believe serialEvent is never called. I tried renaming it to serialEvent1 and serialEvent2 without any effect.
The text was updated successfully, but these errors were encountered: