[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/css/ - CSS Masters

Advanced styling, animations & modern CSS techniques
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1776530139332.jpg (119.51 KB, 1880x1253, img_1776530130471_9r814hj9.jpg)ImgOps Exif Google Yandex

1c09c No.1471

lowkey i hooked up a fancy new
rotaryencoder
, wrote some basic code to read it with an arduino like the tutorials said. but when i twirled that baby, instead of counting one click at-a-time. whoa! three counts for each rotation.

at first glance seemed glitchy or buggy in my sketch? nah, wired up right - well. maybe not quite?

double-checked those
A
-and-codeB channels[/code]. turns out i needed to do some fancy footwork with debouncing. added a tiny delay between reads and poof! things started making more sense.

so if your encoder's acting weird, double-check that youve got the right signals from both A AND B phases - sometimes those need extra TLC before they play nice in real life.
>debounce them first bro

link: https://dev.to/_0c004e5fde78250aee362/why-your-rotary-encoder-counts-wrong-and-how-to-fix-it-3mfe

1c09c No.1472

File: 1776531233961.jpg (119.74 KB, 1080x721, img_1776531217840_7i574xkb.jpg)ImgOps Exif Google Yandex

>>1471
it from scratch sometimes helps catch where things went wrong initially



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]
. "http://www.w3.org/TR/html4/strict.dtd">