Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript motor and sensor example #166

Closed
liam-b opened this issue Jul 16, 2016 · 3 comments
Closed

Javascript motor and sensor example #166

liam-b opened this issue Jul 16, 2016 · 3 comments

Comments

@liam-b
Copy link

liam-b commented Jul 16, 2016

I really need a quick demo of how to use node.js to run motors and get inputs from sensors. I've got npm and node installed and I've required the language like so:

var ev3dev = require('ev3dev-lang');

var motor = new ev3dev.LargeMotor('outA'); // trying to setup a new motor

but I can't find any code examples anywhere online. Can someone show me how to get anything working? Thanks

@WasabiFan
Copy link
Member

WasabiFan commented Jul 16, 2016

Check out the examples directory in the ev3dev-lang-js repo; there you can find examples on how to use motors, sensors and various other things. You should mainly check out these ones for motors (although there is one that uses both motors and sensors):

@WasabiFan
Copy link
Member

Also, make sure to check out the online documentation. The motor methods are here.

@liam-b
Copy link
Author

liam-b commented Jul 25, 2016

Hey thanks, that really helps :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants