robot-loop
v0.2.3
Published
Set up cycle shell loop for ev3-client
Downloads
20
Readme
robot-loop
Set up cycle shell loop for ev3-client
Installation
npm install robot-loop
Usage
var {loop, move, motor, out, sleep, read} = require('robot-loop')
loop(main, '192.168.1.100')
var steer = move('b', 'c')
function * main () {
yield steer.rotations(1, 60, 0)
}
API
loop(main, address)
Connect the main function to the ev3-client run middleware and use it to create a cycle shell loop.
Parameters
main
- Type: function
- generator function yielding ev3-client functions
address
- Type: string
- string containing the ip address of the robot
out(msg)
Create an out action to add a message to the current cycle-shell process.
Parameters
out
- Type: string
- The message to display
ev3-client API
This package exposes the API from ev3-client