Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A ArduinoJson
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Benoît Blanchon
  • ArduinoJson
  • Issues
  • #156
Closed
Open
Issue created Nov 09, 2015 by Benoît Blanchon@bblanchonOwner

Wait for serial port to be ready

From issue #153 (closed):

BTW - you say that this library works on "every arduino board" and so I would add this in your examples:

void setup() {
 Serial.begin(9600);
//  while (!Serial); // this line needs to be in setup for leonardo and Yun to work
// here goes the rest of your example

Without this while loop your example sketch works, but nobody can see it, since Yun doesn't restart/wait for the serial to open connection, and executes setup function right after the sketch is being uploaded to the board.

Assignee
Assign to
Time tracking