You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are experiencing trouble but not certain of the cause, or need help using this code, ask on the appropriate forum. This is not the place to ask for support or help, even directly related to this code. Only use this form you are certain you have discovered a defect in this code!
Please verify the problem occurs when using the very latest version, using the newest version of Arduino and any other related software.
Describe your problem.
When I use this library to count pulses, I receive double counts. Why?
Steps To Reproduce Problem
Please give detailed instructions needed for anyone to attempt to reproduce the problem.
Hardware & Software
Board
Shields / modules used
Arduino IDE version
Teensyduino version (if using Teensy)
Version info & package name (from Tools > Boards > Board Manager)
Operating system & version
Any other software or hardware?
Arduino Sketch
// Change the code below by your sketch (please try to give the smallest code that demonstrates the problem)
#include<Arduino.h>// libraries: give links/details so anyone can compile your code for the same resultvoidsetup() {
}
voidloop() {
}
Errors or Incorrect Output
If you see any errors or incorrect output, please show it here. Please use copy & paste to give an exact copy of the message. Details matter, so please show (not merely describe) the actual message or error exactly as it appears.
The text was updated successfully, but these errors were encountered:
I'm also facing this issue when running the Basic.ion example. I can get around this problem by checking modulo 2 in the condition (see code below), but that seems totally hacky and unnecessary. Any idea how to fix this double increment problem? I'm on a Teensy 4.1
void loop() {
long newPosition = myEnc.read();
+ if (newPosition != oldPosition && newPosition % 2 == 0) {- if (newPosition != oldPosition) {
oldPosition = newPosition;
Serial.println(newPosition);
}
}
Please use this form only to report code defects or bugs.
For any question, even questions directly pertaining to this code, post your question on the forums related to the board you are using.
Arduino: forum.arduino.cc
Teensy: forum.pjrc.com
ESP8266: www.esp8266.com
ESP32: www.esp32.com
Adafruit Feather/Metro/Trinket: forums.adafruit.com
Particle Photon: community.particle.io
If you are experiencing trouble but not certain of the cause, or need help using this code, ask on the appropriate forum. This is not the place to ask for support or help, even directly related to this code. Only use this form you are certain you have discovered a defect in this code!
Please verify the problem occurs when using the very latest version, using the newest version of Arduino and any other related software.
----------------------------- Remove above -----------------------------
Description
Describe your problem.
When I use this library to count pulses, I receive double counts. Why?
Steps To Reproduce Problem
Please give detailed instructions needed for anyone to attempt to reproduce the problem.
Hardware & Software
Board
Shields / modules used
Arduino IDE version
Teensyduino version (if using Teensy)
Version info & package name (from Tools > Boards > Board Manager)
Operating system & version
Any other software or hardware?
Arduino Sketch
Errors or Incorrect Output
If you see any errors or incorrect output, please show it here. Please use copy & paste to give an exact copy of the message. Details matter, so please show (not merely describe) the actual message or error exactly as it appears.
The text was updated successfully, but these errors were encountered: