Skip to content

10 second delay before using Arduino Mega 2560 #36

Open
@phemmer

Description

@phemmer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions