-
Notifications
You must be signed in to change notification settings - Fork 115
Description
at the beginning I would like to congratulate you on your work.
i tried the "" cdservoMega_magneticEncoder_brushlessMotor "" file on my arduino mega. It does not work. AND THE SERIAL MONITOR IS NOT RESPONDING.
I tried the file "" dcservoUNO "" the serial monitor responds. I turn the motor in both directions the position does not change but the traget only increases. I think the problem is this part of the code
"ISR (PCINT0_vect) {// handle pin change interrupt for D8
Old = New << 2;
New = (PINB & 1) + ((PIND & 4) >> 1); //
encoder0Pos + = QEM [Old + New];
}
void encoderInt () {// handle pin change interrupt for D2
Old = New << 2;
New = (PINB & 1) + ((PIND & 4) >> 1); //
encoder0Pos + = QEM [Old + New]; ""
could you help me run your code on an arduino mega. my configuration: a mitsumi m21 2r 14 2241 dc motor with its rotary encoder
and I also have dc motors with linear encoders found in print

thank you