README.md

# rcade_inputs

[![Package Version](https://img.shields.io/hexpm/v/rcade_inputs)](https://hex.pm/packages/rcade_inputs)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/rcade_inputs/)

Lustre input bindings for Recurse Center's [RCade](https://github.com/fcjr/RCade) arcade cabinet.
Covers joysticks/buttons and spinners, for both players.

## Installation

```sh
gleam add rcade
bun add @rcade/plugin-input-classic @rcade/plugin-input-spinners
```

## Usage

Poll all inputs on an interval:

```gleam
inputs.poll(every: 50, with: Inputs)
```

Subscribe to discrete button presses:

```gleam
inputs.on_press(with: ButtonPressed)
```