shokai / arduino_firmata

Arduino Firmata protocol implementation on Ruby
http://shokai.github.io/arduino_firmata
MIT License
104 stars 23 forks source link

Fix problem where write would block (with eventmachine) #31

Closed threez closed 10 years ago

threez commented 11 years ago

When i try to connect to the arduino on linux i get a:

lib/arduino_firmata/arduino.rb:169: in `write_nonblock':
  Resource temporarily unavailable - write would block (Errno::EAGAIN)

This fix retries sending with a little delay, until the device is ready for sending.

shokai commented 11 years ago

thank you for patch. now I'm pretty busy so I'll check on Arduino next week.

shokai commented 10 years ago

sorry too late. I've shipped v0.3.4.