Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johntalton/rotaryencoder
Rotary Encoder
https://github.com/johntalton/rotaryencoder
24-pulse-encoder gpio mqtt onoff rotary statemachine
Last synced: about 1 month ago
JSON representation
Rotary Encoder
- Host: GitHub
- URL: https://github.com/johntalton/rotaryencoder
- Owner: johntalton
- License: mit
- Created: 2017-07-14T07:50:00.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-06T08:12:08.000Z (8 months ago)
- Last Synced: 2024-05-06T09:31:05.602Z (8 months ago)
- Topics: 24-pulse-encoder, gpio, mqtt, onoff, rotary, statemachine
- Language: JavaScript
- Homepage:
- Size: 1.87 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rotary Encoder
Simple knob control. Good for simple step up / step down rotation where center point is reset on power.
[![npm Version](http://img.shields.io/npm/v/@johntalton/RotaryEncoder.svg)](https://www.npmjs.com/package/@johntalton/RotaryEncoder)
![GitHub package.json version](https://img.shields.io/github/package-json/v/johntalton/RotaryEncoder)
![CI](https://github.com/johntalton/RotaryEncoder/workflows/CI/badge.svg?branch=master&event=push)
![GitHub](https://img.shields.io/github/license/johntalton/RotaryEncoder)
[![Downloads Per Month](http://img.shields.io/npm/dm/@johntalton/RotaryEncoder.svg)](https://www.npmjs.com/package/@johntalton/RotaryEncoder)
![GitHub last commit](https://img.shields.io/github/last-commit/johntalton/RotaryEncoder)
[![Package Quality](https://npm.packagequality.com/shield/%40johntalton%2FRotaryEncoder.svg)](https://packagequality.com/#?package=@johntalton/RotaryEncoder)Uses spec defined state machine to validate control and give accurate and consistant output (see bellow).
Also includes push down / up button functionality (click like events)
[Adafruit Rotary Encoder](https://www.adafruit.com/product/377)
## client
simple mqtt client to stream a set of encoder event
## dependency
```onoff``` currently used.
## state machine
implementation uses a simple state machines as seen below with events of CW CCW RCW and RCCW.
![encoder states](75ED7B44-BD04-46EE-B53A-21901E7E68FD.jpeg)