Closed ghendricks closed 10 years ago
Hi @ghendricks this is happening because the firmata module tries to install cylon-i2c which in turns tries to install node-i2c the one failing due to some missing linux libs that you are not going to have available in OSX. We'll push an update for this, in the mean time there is a simple workaround you can use the repos instead.
if you are not using or no not need i2c support:
if you do need i2c support:
This should work with all functionality intact, I will push a fix for the dependency issues later today so it gets out in the next npm module release.
Let me know if there's anything else I can do to help.
Hi @ghendricks
This should be fix by now, have you ever had a chance to check it out? let us know so we can close the issue.
hi edgarsilva when i ran my sample blinking led code in my mac this is the error i got
neo$ node blinkCjs.js I, [2014-07-03T14:53:11.694Z] INFO -- : Initializing connections. I, [2014-07-03T14:53:11.697Z] INFO -- : Initializing connection 'arduino'. D, [2014-07-03T14:53:11.697Z] DEBUG -- : Loading adaptor 'firmata'. D, [2014-07-03T14:53:11.986Z] DEBUG -- : Registering Firmata adaptor for Robot 65599 D, [2014-07-03T14:53:11.986Z] DEBUG -- : Registering GPIO AnalogSensor driver for Robot 65599 D, [2014-07-03T14:53:11.987Z] DEBUG -- : Registering GPIO Button driver for Robot 65599 D, [2014-07-03T14:53:11.987Z] DEBUG -- : Registering GPIO ContinuousServo driver for Robot 65599 D, [2014-07-03T14:53:11.987Z] DEBUG -- : Registering GPIO LED driver for Robot 65599 D, [2014-07-03T14:53:11.987Z] DEBUG -- : Registering GPIO MakeyButton driver for Robot 65599 D, [2014-07-03T14:53:11.987Z] DEBUG -- : Registering GPIO Maxbotix driver for Robot 65599 D, [2014-07-03T14:53:11.987Z] DEBUG -- : Registering GPIO Motor driver for Robot 65599 D, [2014-07-03T14:53:11.987Z] DEBUG -- : Registering GPIO Servo driver for Robot 65599 D, [2014-07-03T14:53:11.987Z] DEBUG -- : Registering GPIO IR Range Sensor driver for Robot 65599 D, [2014-07-03T14:53:11.987Z] DEBUG -- : Registering GPIO DirectPin Driver for Robot 65599 D, [2014-07-03T14:53:11.988Z] DEBUG -- : Registering i2c BlinkM driver for Robot 65599 D, [2014-07-03T14:53:11.989Z] DEBUG -- : Registering i2c HMC6352 driver for Robot 65599 D, [2014-07-03T14:53:11.989Z] DEBUG -- : Registering i2c MPL115A2 driver for Robot 65599 D, [2014-07-03T14:53:11.989Z] DEBUG -- : Registering i2c BMP180 driver for Robot 65599 D, [2014-07-03T14:53:11.989Z] DEBUG -- : Registering i2c MPU6050 driver for Robot 65599 D, [2014-07-03T14:53:11.989Z] DEBUG -- : Registering i2c LCD driver for Robot 65599 I, [2014-07-03T14:53:11.990Z] INFO -- : Initializing devices. I, [2014-07-03T14:53:11.990Z] INFO -- : Initializing device 'led'. D, [2014-07-03T14:53:11.990Z] DEBUG -- : Loading driver 'led'. I, [2014-07-03T14:53:11.991Z] INFO -- : Starting connections. I, [2014-07-03T14:53:11.992Z] INFO -- : Connecting to 'arduino' on port /dev/ttyACM0.
events.js:72 throw er; // Unhandled 'error' event ^ Error: Cannot open /dev/ttyACM0
how can handle this error ?
@neonag it appears that you're referencing the wrong serial port
Connecting to 'arduino' on port /dev/ttyACM0
Your serial port will follow the format /dev/cu.usbmodem*
. Once you find the correct serial port, replace /dev/ttyACM0
with the correct port and you should be ready to go!
Same problem, osx Mavericks:
sudo npm install i2c
i2c@0.1.4 install /Users/davem/Documents/Arduino/johnny-five/jf1/first/node_modules/i2c node-gyp rebuild
CXX(target) Release/obj.target/i2c/src/i2c.o In file included from ../src/i2c.cc:11: ../src/i2c-dev.h:27:10: fatal error: 'linux/types.h' file not found
^
1 error generated.
make: *\ [Release/obj.target/i2c/src/i2c.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Darwin 13.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/davem/Documents/Arduino/johnny-five/jf1/first/node_modules/i2c
gyp ERR! node -v v0.10.29
@davidmoshal the i2c module doesn't have OS X support (requires Linux-specific headers) and so cannot be installed on any version of OS X. The i2c
module itself is primarily designed to be run directly on single-board Linux computers like the Raspberry Pi or Beaglebone Black.
For more info, see https://github.com/kelly/node-i2c/issues/17.
@davidmoshal did you mean to install the cylon-i2c drivers? You would use npm install cylon-i2c
This not the same as the node i2c module.
trying to connect to an i2c module (Adafruit 8x8 led matrix) using johnny-five (ie: Node) on osx. can connect to simple led, but not i2c modules.
Johnny-five uses node.js, just like cylon.js does, but you probably would not use both cylon.js and johnny-five at the same time. @davidmoshal can you provide an example of your code, please?
@davidmoshal you should file a bug here: https://github.com/rwaldron/johnny-five/issues?state=open
The original issue was already addressed, so I am going to close this one.
I am trying to install on Mac OSX Mountain Lion but I am getting the following: