Johnny Five: the board is not ready

Previously, I had an Arduino kit running on the same hardware as Breakout, but I would like to upgrade to Johnny Five . My equipment is connected using a simple single LED layout from http://weblog.bocoup.com/javascript-arduino-programming-with-nodejs/ , but starting the basic LED strobe demo does not work properly:

var five = require("johnny-five"), board, led; board = new five.Board(); board.on("ready", function() { console.log('ready'); led = new five.Led(13); led.strobe(100); }); 

Return:

 1341154189666 Board Connecting... 1341154189697 Serial Found possible serial port cu.usbmodem621 1341154189699 Board -> Serialport connected cu.usbmodem621 1341154191570 Repl Successfully Connected 

I end right in Firmata REPL without gating LEDs, and board.ready is false .

Any suggestions as to why the board.ready callback will not work?

+4
source share
2 answers

On Windows, sometimes you need to specify which COM port . When flashing firmata, I got the following error:

 avrdude: stk500_getsync(): not in sync: resp=0x00 
  • Change the Arduino user interface to point to a different COM port (COM4 in my case)

    Tools โ†’ Serial Port โ†’ COM4

  • Add this to your johnny-five startup code:

    var five = require("johnny-five"); board = new five.Board({ port: "COM4" }); board.on("ready", ...);

+7
source

I ran into this problem on my Arduino Uno R3 using johnny-five. To fix this, I had to update StandardFirmata.

  • Download the latest version of Arduino software (at time of writing 1.0.2)
  • Install and open the Arduino app.
  • Connect your Arduino to your computer (via USB).
  • From the menu, choose File> Examples> Firmata> StandardFirmata
  • Press download button

After that, I can connect to the board using firmata, and the finished event fires as expected. I had to do the same process with all my Arduinos in order to get them to work.

+6
source

All Articles