akinnee / johnny-five-rotary-encoder

Example of how to use a rotary encoder with johnny-five
GNU General Public License v3.0
10 stars 2 forks source link

Miss almost all ticks #1

Open planer-pro opened 6 years ago

planer-pro commented 6 years ago

Hi. Use your example. Already miss almost all ticks Up and Down but see what arduino send every tick on TX led, but at the same time in console see ticks rarely. May you fix it? p.s Add to pressButton - isPullup: true, option - button goes well work. const pressButton = new five.Button({ pin: 11, isPullup: true, invert: true

canda commented 6 years ago

Perhaps the sampling rate is too low? If I move it really slow it works

canda commented 6 years ago

shouldn't we use something with hardware interruptions? I couldn't understand yet how to configure it, but it seems firmata comes with native support for encoders https://github.com/firmata/FirmataEncoder https://github.com/firmata/protocol/blob/master/encoder.md

planer-pro commented 6 years ago

resolve its problem. Send comit