# robot-loop

> Set up cycle shell loop for ev3-client

Latest version **0.2.3** (published 2017-07-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install robot-loop
pnpm add robot-loop
yarn add robot-loop
bun add robot-loop
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.3 |
| Published | 2017-07-13 |
| First published | 2016-03-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | danleavitt0 |
| Maintainers | danleavitt0 |
| Keywords | ev3 |

## Links

- npm: https://www.npmjs.com/package/robot-loop
- Repository: https://github.com/ev3-js/robot-loop
- Homepage: https://github.com/ev3-js/robot-loop#readme
- Issues: https://github.com/ev3-js/robot-loop/issues
- npm.io page: https://npm.io/package/robot-loop

## Dependencies (10)

- [yoco](https://npm.io/package/yoco.md) 1.6.2
- [firebase](https://npm.io/package/firebase.md) ^3.0.3
- [socket.io](https://npm.io/package/socket.io.md) ^1.4.5
- [@f/compose](https://npm.io/package/@f/compose.md) 1.0.1
- [ev3-client](https://npm.io/package/ev3-client.md) ^0.1.58
- [cycle-shell](https://npm.io/package/cycle-shell.md) 0.4.22
- [@f/flatten-gen](https://npm.io/package/@f/flatten-gen.md) 2.0.0
- [@f/is-generator](https://npm.io/package/@f/is-generator.md) 1.3.2
- [socket.io-client](https://npm.io/package/socket.io-client.md) ^1.4.6
- [regenerator-runtime](https://npm.io/package/regenerator-runtime.md) ^0.10.5

## Recent versions

- 0.2.3 (latest) — 2017-07-13
- 0.2.2 — 2017-06-22
- 0.2.1 — 2017-06-22
- 0.2.0 — 2017-06-22
- 0.1.41 — 2016-11-12
- 0.1.40 — 2016-11-12
- 0.1.39 — 2016-11-12
- 0.1.38 — 2016-11-12
- 0.1.37 — 2016-06-03
- 0.1.36 — 2016-06-03
- 0.1.35 — 2016-06-02
- 0.1.34 — 2016-06-02
- 0.1.33 — 2016-06-02
- 0.1.31 — 2016-06-02
- 0.1.30 — 2016-06-02
- … 28 more at https://npm.io/package/robot-loop/versions

## README

# robot-loop

Set up cycle shell loop for ev3-client

## Installation

    npm install robot-loop

## Usage

```js
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](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions)**
-  generator function yielding ev3-client functions

`address`
- Type: **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/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](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)**
- The message to display

### [ev3-client API](http://github.com/ev3-js/ev3-client)

This package exposes the API from ev3-client

---
_Source: https://npm.io/package/robot-loop · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
