Skip to content
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

10 second delay before using Arduino Mega 2560 #36

Open
phemmer opened this issue Apr 21, 2014 · 0 comments
Open

10 second delay before using Arduino Mega 2560 #36

phemmer opened this issue Apr 21, 2014 · 0 comments

Comments

@phemmer
Copy link

phemmer commented Apr 21, 2014

I have an Arduino Mega 2560 and whenever using this library, I have to wait 10 seconds after connecting before sending any commands.
I've been testing with a simple LED on pin 10 and using digital_write(10, true). If I write within the first 10 seconds after connect, nothing happens. Also If I write at the 9th second, I have to wait 10 more seconds before it will respond. Basically it requires 10 seconds of silence after connect before it will start working.

However by removing the following code in arduino.rb line 54, it only requires a 1 second delay.

  (0...6).each do |i|
    write(REPORT_ANALOG | i)
    write 1
  end
  (0...2).each do |i|
    write(REPORT_DIGITAL | i)
    write 1
  end

I'm not sure exactly why this occurring, or why that code is there, but if it's causing such a huge delay, perhaps it should be removed, or at least made optional.

phemmer added a commit to phemmer/arduino_firmata that referenced this issue Jun 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant