-
Notifications
You must be signed in to change notification settings - Fork 6
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
did not work with pro mini #2
Comments
Hi,
#define PIN_IN_A 5
#define PIN_IN_B 4
void setup() {
Serial.begin(115200);
pinMode(PIN_IN_A, INPUT_PULLUP);
pinMode(PIN_IN_B, INPUT_PULLUP);
}
void loop() {
Serial.print(digitalRead(PIN_IN_A)*3+5);
Serial.print(" ");
Serial.println(digitalRead(PIN_IN_B)*3);
} |
yes , this code work, |
Sorry, I thought (read) you are using esp2866 chip and ESP2866 branch (I know you wrote arduino pro mini, but but I read it somehow wrongly). You can try to remove line #define FLIP_ENCODER from config.h file. If it doesn't work you can try to enable debug prints. Set ENABLE_PRINTS to 60 from config.h (it prints values of internal_encoder_position and motor_position). If everything works ok, internal_encoder_position value should increase when motor_position value increases and internal_encoder_position value should decrease when motor_position decreases. Please be aware about that there are known bug in master branch and you should swap D3 and D8 pins on 8-bit Arduino (this needs also some code changes. I have no time do this :(). StepIn needs RISING interrupt. CHANGE interrupt causes too many interrupts for 8-bit arduino and it starts losing pulses at high speed. This issue has been fixed in ESP2866 branch. |
hello dear
with wireing like in readme file , with arduino pro mini , did not work
it seems can not count quadruples encoder.
The text was updated successfully, but these errors were encountered: