hybridgroup / cylon-firmata

Cylon adaptor for the Firmata protocol
http://cylonjs.com
Other
45 stars 10 forks source link

blinkM example; "EventEmitter memory leak detected." #42

Closed kevincannon closed 9 years ago

kevincannon commented 9 years ago

Hi all. Thanks for the reply yesterday :)

I'm trying the BlinkM example code to work. I've gotten Cylon & Firmata working fine, and BlinkM works perfectly well with the BlinkMController, but the i2c stuff is failing when the cylon & firmata combination. Here are the errors.

I, [2015-05-21T21:10:22.480Z]  INFO -- : [Robot 35514] - Initializing connections.
I, [2015-05-21T21:10:22.694Z]  INFO -- : [Robot 35514] - Initializing devices.
I, [2015-05-21T21:10:22.697Z]  INFO -- : [Robot 35514] - Starting connections.
I, [2015-05-21T21:10:25.984Z]  INFO -- : [Robot 35514] - Starting devices.
I, [2015-05-21T21:10:25.985Z]  INFO -- : [Robot 35514] - Working.
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at addListener (events.js:160:15)
    at once (events.js:185:8)
    at Board.sendI2CReadRequest ( /Users/kevin.cannon/Documents/Prototyping/cylon-firmata/node_modules/cylon-firmata/node_modules/firmata/lib/firmata.js:956:8)
    at Adaptor.i2cRead ( /Users/kevin.cannon/Documents/Prototyping/cylon-firmata/node_modules/cylon-firmata/lib/firmata.js:202:14)
    at BlinkM.getRGBColor ( /Users/kevin.cannon/Documents/Prototyping/cylon-firmata/node_modules/cylon-i2c/lib/blinkm.js:190:26)
    at null.<anonymous> ( /Users/kevin.cannon/Documents/Prototyping/cylon-firmata/cylon.js:30:17)
    at wrapper [as _onTimeout] (timers.js:261:14)
    at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)

I noticed someone else having a similar issue a few months back here, but they never said if the issue was resolved for them: https://github.com/hybridgroup/cylon-i2c/issues/17

I think it may be a wiring issue. I've tried it the way it's documented on the BlinkM page (just plugging it in) http://thingm.com/fileadmin/thingm/images/photos/tm_blinkm_arduino_insert.jpg and also on your documentation page: http://cylonjs.com/documentation/drivers/blinkm/ (though without the resistors as it seems they're not needed)

Any thoughts? I tried to follow the advice for the compass in the other thread, but wasn't sure where to apply that code to test it.

deadprogram commented 9 years ago

Using my Arduino Uno, I have it wired, from left to right on the BlinkM:

(minus) is plugged into the Arduino's GND pin (plus) is plugged into the Arduino's 3.3V pin d is plugged into the Arduino's A4 pin c is plugged into the Arduino's A5 pin

Hope that helps!

kevincannon commented 9 years ago

Hey - that's great. It's working perfectly now. I'm not quite sure what was happening before. I'm pretty sure I'd tried that too.

Thanks very much for the help - that's really fantastic, I appreciate it a lot :)