https://github.com/konsumer/4encoder
C & puredata extension for working with a specific 4-encoder i2c device
https://github.com/konsumer/4encoder
Last synced: 5 months ago
JSON representation
C & puredata extension for working with a specific 4-encoder i2c device
- Host: GitHub
- URL: https://github.com/konsumer/4encoder
- Owner: konsumer
- License: mit
- Created: 2024-04-08T06:48:37.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-09T22:06:53.000Z (about 2 years ago)
- Last Synced: 2025-04-07T13:40:48.157Z (about 1 year ago)
- Language: Makefile
- Homepage:
- Size: 34.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 4encoder
> [!WARNING]
> I am still working on this. these devices are quite a bit more complicated to interface in C than [these](https://github.com/konsumer/8encoder/), so it will probly take some time. I ended up consolidating these into a single repo at [pipd](https://github.com/konsumer/pipd).
Various libs for working with [an i2c 4 rotary-encoder thing](https://www.adafruit.com/product/5752) on a pi.
- [linux-4encoder](linux-4encoder) - C lib. Just uses regular linux stuff.
- [puredata-pi4encoder](puredata-pi4encoder) - Puredata extension that use linux-4encoder
- Simple python example [here](https://github.com/konsumer/4encoder/blob/main/demo.py) that uses blinka/circuitpython
There is [reference here](https://learn.adafruit.com/adafruit-seesaw-atsamd09-breakout/reading-and-writing-data) for i2c format.
Make sure to add this to your `/boot/firmware/config.txt`:
```
# dtparam=i2c_arm=on,i2c_arm_baudrate=50000
# dtparam=i2c_arm=on,i2c_arm_baudrate=100000
# dtparam=i2c_arm=on,i2c_arm_baudrate=400000
dtparam=i2c_arm=on,i2c_arm_baudrate=1000000
```
## TODO
- Have a look [here](https://github.com/giuliomoro/OSC2OLED4Bela) for a pretty complete i2c OLED driver. This idea should work for all 3 (OLED, 4encoder, 8encoder)