{"action":"created","issue":{"url":"https://api.github.com/repos/ev3dev/ev3dev-lang/issues/43","labels_url":"https://api.github.com/repos/ev3dev/ev3dev-lang/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/ev3dev/ev3dev-lang/issues/43/comments","events_url":"https://api.github.com/repos/ev3dev/ev3dev-lang/issues/43/events","html_url":"https://github.com/ev3dev/ev3dev-lang/issues/43","id":57218560,"number":43,"title":"JavaScript binding - test-motor-sensor.js does not find '/sys/class/lego-sensor/'","user":{"login":"AleksiAhtiainen","id":6376268,"avatar_url":"https://avatars.githubusercontent.com/u/6376268?v=3","gravatar_id":"","url":"https://api.github.com/users/AleksiAhtiainen","html_url":"https://github.com/AleksiAhtiainen","followers_url":"https://api.github.com/users/AleksiAhtiainen/followers","following_url":"https://api.github.com/users/AleksiAhtiainen/following{/other_user}","gists_url":"https://api.github.com/users/AleksiAhtiainen/gists{/gist_id}","starred_url":"https://api.github.com/users/AleksiAhtiainen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AleksiAhtiainen/subscriptions","organizations_url":"https://api.github.com/users/AleksiAhtiainen/orgs","repos_url":"https://api.github.com/users/AleksiAhtiainen/repos","events_url":"https://api.github.com/users/AleksiAhtiainen/events{/privacy}","received_events_url":"https://api.github.com/users/AleksiAhtiainen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ev3dev/ev3dev-lang/labels/JavaScript","name":"JavaScript","color":"f7df1e"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-02-10T18:54:24Z","updated_at":"2015-02-11T16:57:08Z","closed_at":null,"body":"Hi,\r\n\r\nI'm trying to get node.js bindings working on ev3dev. I found out that examples/test-motor-sensor.js does not work. See below. Has the folder been renamed or the interface to motor sensors changed? I am assuming this example should work with the large/medium EV3 motors.\r\n\r\nI am using latest self-compiled js bindings.\r\n\r\n```text\r\nalah@ev3dev:~/work/ev3-js-tests$ nodejs test-motor-sensor.js\r\nMotor --------------\r\ndutyCycle: 0\r\ndutyCycleSp: 0\r\nportName: outA\r\nposition: 0\r\npositionSp: 0\r\npulsesPerSecond: 0\r\npulsesPerSecondSp: 0\r\nrampDownSp: 0\r\nrampUpSp: 0\r\nregulationMode: off\r\nrun: 0\r\nrunMode: forever\r\nspeedRegulationP: 1000\r\nstate: idle\r\nstopMode: coast\r\nstopModes: coast,brake,hold\r\ntimeSp: 0\r\ntype: tacho\r\nSetting motor properties...\r\nRunning motor...\r\n--------------------\r\nSensor -------------\r\n{ [Error: ENOENT, no such file or directory '/sys/class/lego-sensor/']\r\n  errno: 34,\r\n  code: 'ENOENT',\r\n  path: '/sys/class/lego-sensor/',\r\n  syscall: 'readdir' }\r\n\r\nError: You must be connected to a device before you can read from it.\r\n    at Sensor.Device.readProperty (/home/alah/work/index.js:98:19)\r\n    at Sensor.Device.readString (/home/alah/work/index.js:87:26)\r\n    at Sensor.Device.getString (/home/alah/work/index.js:94:21)\r\n    at Sensor.Object.defineProperty.get [as portName] (/home/alah/work/index.js:768:25)\r\n    at i (/home/alah/work/ev3-js-tests/test-motor-sensor.js:31:38)\r\n    at Array.forEach (native)\r\n    at Object.<anonymous> (/home/alah/work/ev3-js-tests/test-motor-sensor.js:30:3)\r\n    at Module._compile (module.js:456:26)\r\n    at Object.Module._extensions..js (module.js:474:10)\r\n    at Module.load (module.js:356:32)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ev3dev/ev3dev-lang/issues/comments/73917834","html_url":"https://github.com/ev3dev/ev3dev-lang/issues/43#issuecomment-73917834","issue_url":"https://api.github.com/repos/ev3dev/ev3dev-lang/issues/43","id":73917834,"user":{"login":"dlech","id":963645,"avatar_url":"https://avatars.githubusercontent.com/u/963645?v=3","gravatar_id":"","url":"https://api.github.com/users/dlech","html_url":"https://github.com/dlech","followers_url":"https://api.github.com/users/dlech/followers","following_url":"https://api.github.com/users/dlech/following{/other_user}","gists_url":"https://api.github.com/users/dlech/gists{/gist_id}","starred_url":"https://api.github.com/users/dlech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlech/subscriptions","organizations_url":"https://api.github.com/users/dlech/orgs","repos_url":"https://api.github.com/users/dlech/repos","events_url":"https://api.github.com/users/dlech/events{/privacy}","received_events_url":"https://api.github.com/users/dlech/received_events","type":"User","site_admin":false},"created_at":"2015-02-11T16:57:08Z","updated_at":"2015-02-11T16:57:08Z","body":"Someone else reported this problem today in ev3dev/ev3dev#267. Since the problem is a general ev3dev problem and not specific to ev3dev-lang, I am continuing the discussion there and suggest that this issue be closed as invalid since there is not actually a problem with ev3dev-lang or the javascript bindings. Please see ev3dev/ev3dev#267 for why I think that the kernel upgrade is not taking effect."}}