Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

robot-loop

ev3-js168MIT0.2.3

Set up cycle shell loop for ev3-client

ev3

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