robot-loop

0.2.3 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i robot-loop

Weekly Downloads

4

Version

0.2.3

License

MIT

Last publish

Collaborators

  • danleavitt0