Blinkt module + rotary encoder?

Have never used a rotary encoder for any project before, but does anyone have any solutions, or would it even be possible to use a rotary encoder to change the brightness of a Blinkt module on the fly?

I haven’t seen much, and rotary encoders on PI in general seem to be a bit of a mystery.

Did find this code on github that looks like it would be a good starting point:

And this post about connecting the Blinkt to a switch / button:

Previously I was looking into the gpio zero library which seems to have good encoder support, and a simplified command structure, but I wasn’t having any luck getting anything to work from there. Better success with rpi.gpio

I think this should be fairly simple, but am having trouble getting started. Any additional tips would be greatly appreciated. Thanks.

Have a look see here, for the encoder
Adafruit Learning System
And here for the Blinkt
Welcome — Blinkt! 0.1.1 documentation (pimoroni.com)
You want to look at the blinkt.set_brightness(brightness)
brightness: 0.0 to 1.0

I’d do something like blinkt.set_brightness(b)
Then change the value of the variable (b) with the encoder.

One suggestion I would make is perhaps to consider changing the colour rather than the brightness.

It can be done as noted above, but personally I find the Blinkt to be blindingly bright at anything much above its minimum setting (0.05). So whilst it would work to adjust the brightness, you may well end up getting dazzled.

Actually coding for Blinkt in Python3 is dead easy. The examples will take you a long way, and if you get stuck the community here can help you along.

Basically it’s a single row of eight APA102 (also known as DotStar) RGB LEDs.

I have a couple of rotary encoders on a radio, for tuning and volume control.
Search online for Bob Rathbone Pi Radio to see how they’re configured.