johnny-five icon indicating copy to clipboard operation
johnny-five copied to clipboard

Ready event not fired

Open jblanche opened this issue 14 years ago • 17 comments

I'm using an Arduino Ethernet and when trying to start

node eg/repl.js

I get

~/dev/tests/johnny-five > node eg/repl.js                                                                                                                       
1342540562581 Board Connecting... 
1342540562589 Serial Found possible serial port cu.usbmodemfa141
1342540562590 Board -> Serialport connected cu.usbmodemfa141

But I'm never reaching the console.log statement. Same problem with something simple like leb-strobe.js.

Arduino IDE version : 1.0.1 Node version : Tried with 0.6.18 and 0.8.2 Arduino : Arduino Ethernet

jblanche avatar Jul 17 '12 16:07 jblanche

Thanks for the report - I haven't actually tested with an Arduino Ethernet, so I'll have to order one to work through this.

Another issue might be the recent serialport 1.0 release and how the Firmata protocol interacts with it, see:

https://github.com/jgautier/firmata/pull/11/

rwaldron avatar Jul 17 '12 16:07 rwaldron

Ok, so the patch above has landed and I tested it out and everything seems to install correctly - can you try from scratch and let me know? Thanks!

rwaldron avatar Jul 17 '12 16:07 rwaldron

Yes, everything works fine with the patch ! Thanks a lot, now I can test all the stuff from the blog ;)

jblanche avatar Jul 17 '12 17:07 jblanche

Awesome -- thanks for your patience :)

rwaldron avatar Jul 17 '12 17:07 rwaldron

Also... I'd love to see anything you make, ping me on twitter @rwaldron

rwaldron avatar Jul 17 '12 17:07 rwaldron

I was running into this same problem on my Arduino Uno R3 (the ready event never fired), but I had a different fix: I had to update the StandardFirmata.

  1. Download the latest Arduino software (at time of writing 1.0.2)
  2. Install and open the Arduino application
  3. Connect the Arduino to the computer (through USB)
  4. In the menu, select File > Examples > Firmata > StandardFirmata
  5. Press the upload button

After that completed, I could connect to the board using firmata and the ready event fired as expected. I had to do the same process with all my Arduinos to get them to work.

derekgaw avatar Nov 10 '12 20:11 derekgaw

StandardFirmata from IDE 1.0, 1.0.1, 1.0.2 all work fine... It just has to be there to work ;)

rwaldron avatar Nov 11 '12 01:11 rwaldron

Running into this issue as well with an Arduino Uno on Raspberry Pi. Have tried StandardFirmata from 1.0.2 all the way to the new beta (1.5.2, I think), and I get the same:

1364595646587 Board Connecting... 
1364595647411 Serial Found possible serial port ttyACM0
1364595647431 Board -> Serialport connected ttyACM0

Originally installed J5 from npm, but have tried a fresh install from GitHub, along with the same for node-serialport. Still coming up short and fresh outta ideas. Has anyone come across something similar with this setup?

I'm running node 0.10.2 on the Pi, with good ol' wheezy Raspbian.

jonlong avatar Mar 29 '13 22:03 jonlong

What's the power source ?

paultag avatar Mar 29 '13 22:03 paultag

Have tried both rPI powering the board standalone, as well as both plugged into separate power sources.

jonlong avatar Mar 29 '13 22:03 jonlong

I mean to the RPI, low wattage causes USB issues

paultag avatar Mar 29 '13 22:03 paultag

Oh, gotcha. Have tried a Vizio Flatscreen TV, a MacBook Pro, and a little Motorola USB charger that outputs 850mA. Is there a standard I should be going for with this kind of setup (sorry, super new at it)?

jonlong avatar Mar 29 '13 22:03 jonlong

@jonlong the suggested supply is 1000 mA, have a phone charger handy?

paultag avatar Mar 29 '13 22:03 paultag

@paultag Ah, great to know, thanks. Just tried it with my iPhone charger, but still no dice.

jonlong avatar Mar 29 '13 23:03 jonlong

Ah sorry. Sounds like @rwldrn turf to me. Back to netflix!

paultag avatar Mar 29 '13 23:03 paultag

Looks like this may have something to do with https://github.com/jgautier/firmata/issues/17. Will keep an eye on that one. Thanks again for looking into it!

jonlong avatar Apr 08 '13 15:04 jonlong

@jonlong yep, this is fixed now—thanks!

rwaldron avatar Apr 08 '13 19:04 rwaldron