Code Monkey home page Code Monkey logo

Comments (9)

pwillard avatar pwillard commented on September 25, 2024

I get this too...

from heimcontrol.js.

ni-c avatar ni-c commented on September 25, 2024

Hi,

this might be a problem with the duino-module. Which platform and OS are you using?

You can try to edit the file ./node_modules/duino/lib/board.js in line 75 and change

child.exec('ls /dev | grep ACM', function(err, stdout, stderr){

into

child.exec('ls /dev | grep -e usb -e USB -e ACM', function(err, stdout, stderr){

You can also try to enable the debug messages of duino in ./plugins/arduino/index.js line 22:

this.board = new duino.Board({debug: true});

from heimcontrol.js.

pwillard avatar pwillard commented on September 25, 2024

OK, after that... it does get a bit more verbose...

info - socket.io started
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
heimcontrol.js listening on port 8080

/home/pi/heimcontrol.js/node_modules/requirejs/bin/r.js:378
throw err;
^
Error: Evaluating /home/pi/heimcontrol.js/plugins/arduino/index.js as module "/home/pi/heimcontrol.js/plugins/arduino/index.js" failed with error: SyntaxError: Unexpected token :
at Function.req.load (/home/pi/heimcontrol.js/node_modules/requirejs/bin/r.js:2483:23)
at Object.context.load (/home/pi/heimcontrol.js/node_modules/requirejs/bin/r.js:1865:21)
at Object.Module.load (/home/pi/heimcontrol.js/node_modules/requirejs/bin/r.js:1064:29)
at Object.Module.fetch (/home/pi/heimcontrol.js/node_modules/requirejs/bin/r.js:1054:66)
at Object.Module.check (/home/pi/heimcontrol.js/node_modules/requirejs/bin/r.js:1084:26)
at Object.Module.enable (/home/pi/heimcontrol.js/node_modules/requirejs/bin/r.js:1381:22)
at Object.context.enable (/home/pi/heimcontrol.js/node_modules/requirejs/bin/r.js:1737:39)
at Object. (/home/pi/heimcontrol.js/node_modules/requirejs/bin/r.js:1366:33)
at /home/pi/heimcontrol.js/node_modules/requirejs/bin/r.js:369:23

from heimcontrol.js.

pwillard avatar pwillard commented on September 25, 2024

well, actually... it started working after a reboot.

from heimcontrol.js.

djumaka avatar djumaka commented on September 25, 2024

Hi,
doesn't work for me.

as I added the debug in the plugins/arduino/index.js (the 1st thing I already had). This is what I got:

info - socket.io started
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
heimcontrol.js listening on port 18080
1390854043531 duino info attempting to find Arduino board
1390854043542 duino info found board at undefined
1390854043543 duino info binding serial events

events.js:72
throw er; // Unhandled 'error' event
^
Error: Error Invalid argument calling write(...)

I run it with "sudo node heimcontrol.js" as normal run resulted in smth like "can not read /dev/usbmon2" or similar.
I am with elementaryos (ubuntu).

from heimcontrol.js.

ni-c avatar ni-c commented on September 25, 2024
1390854043542 duino info found board at undefined

Looks like duino can't find your arduino board because there are 4 USB devices, ttyUSB0, usbmon0, usbmon1 and usbmon2:

$ls /dev | grep -e usb -e USB -e ACM
ttyUSB0
usbmon0
usbmon1
usbmon2

As a dirty workaround you can try to change line 85 in ./node_modules/duino/lib/board.js from:

possible = usb.pop();

into

possible = 'ttyUSB0';

from heimcontrol.js.

djumaka avatar djumaka commented on September 25, 2024

Changin "ls /dev | grep ACM" into "ls /dev | grep USB" did the trick. Why are you looking for ACM? Just asking.

from heimcontrol.js.

ni-c avatar ni-c commented on September 25, 2024

On the Raspberry PI with Raspbian the arduino has the device name 'ttyACM0':

$ ls /dev | grep -e usb -e USB -e ACM
ttyACM0

https://www.rfc1149.net/blog/2013/03/05/what-is-the-difference-between-devttyusbx-and-devttyacmx/

from heimcontrol.js.

pwillard avatar pwillard commented on September 25, 2024

Just wanted to confirm... the USB fixed it,

from heimcontrol.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.