Skip to main content
Arduino

Timeline for Calculation error with Optical Encoder

Current License: CC BY-SA 4.0

12 events
when toggle format what by license comment
Dec 2, 2018 at 23:01 history bumped Community Bot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Nov 2, 2018 at 22:21 answer added Bkukuk62 timeline score: 1
Nov 2, 2018 at 19:32 comment added Bkukuk62 I have figured out my issue, at least I am getting good results. With this code I had to change interrupts from CHANGE to RISING. I want to thank everyone that has made comments on this question.
Nov 2, 2018 at 19:24 comment added Bkukuk62 I have done more testing with the code and have noticed that when the encoder has been rotated clockwise past the index the readings do the following 359, 0, 1, 2, 0, 1, 2, 3, after that it reads correctly. When turning the encoder counter clockwise the following happens 1, 0, 359, 358, 0, 359, 358, 357, and then runs correctly. Does anyone see why the encoder would do this as well as the initial issue?
Oct 31, 2018 at 17:17 comment added Bkukuk62 One more comment on the code above. It ran correctly before the Index was introduced. I tested the index and it only fires once per revolution.
Oct 31, 2018 at 13:18 comment added Bkukuk62 It is a Omron E6B2-CWZ6C Incremental Rotary Encoder w/Index (360P/R).
Oct 31, 2018 at 3:53 comment added evolutionizer What is the encoder that you are using? Does it have a 0.5 degree increment?
Oct 31, 2018 at 3:07 comment added Bkukuk62 Thank you, I was wondering how to get the code to format as "code". (him).
Oct 31, 2018 at 2:47 comment added Delta_G I did it for him/her.
Oct 31, 2018 at 2:47 history edited Delta_G CC BY-SA 4.0
Formatting the code
Oct 31, 2018 at 1:48 comment added jsotola please format your code as "code" .... highlight all the code text and click the {} button
Oct 31, 2018 at 0:42 history asked Bkukuk62 CC BY-SA 4.0

AltStyle によって変換されたページ (->オリジナル) /