Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem reading both encoders #23

Open
leo100du opened this issue Oct 21, 2015 · 5 comments
Open

problem reading both encoders #23

leo100du opened this issue Oct 21, 2015 · 5 comments

Comments

@leo100du
Copy link

I have an arduino uno on board and when i put 'e'(read encoders) after moving both motors with (m 50 50, or any numbers), i dont have the same or proximate reading, i get something like this: 2 3259, refering 2--> to the left encoder counter, and 3259 the right encoder counter, my connections are
Left wheel encoder A output -- Arduino UNO pin 2
Left wheel encoder B output -- Arduino UNO pin 3

Right wheel encoder A output -- Arduino UNO pin A4
Right wheel encoder B output -- Arduino UNO pin A5

i've tried to change left encoder pins but i get always similar results
wich could be the solution to this problem?

@kishorekumar29
Copy link

Didi you get around this issue and manage to get perfect results?

@sgzuccaro42
Copy link

Has anyone found a solution for this? I am having the same issue. After many hours of troubleshooting, I still can not read encoder counts on pin 2 and pin 3. I have tried different uno's, different encoders, looking at the encoder pwm with an oscilloscope, reading and writing to pin 2 and 3 (which works), change to other ports... Any advice would be greatly appreciated.

@DerKorb
Copy link

DerKorb commented Sep 27, 2016

For anyone else struggling with this, the vnh5019 shield also uses pin 2 and overwrites it as output.

@roboticsai
Copy link

Can someone tell me which branch of ros arduino package are people using. Cas i'm not able to read encoder values no matter which branch of package i use.

@tomlyq
Copy link

tomlyq commented Nov 30, 2018

if you use uno r3
#define LEFT_ENC_A 2
#define LEFT_ENC_B 4
#define RIGHT_ENC_A 3
#define RIGHT_ENC_B 11

and encoder interrupt should change to int0 and int1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants