iliasam
iliasam
When you set PWM manually, motor is not controlled by encoder, it must work in any case. As I said - check the power line with an oscilloscope when motor...
See this page: https://github.com/iliasam/OpenTOFLidar/wiki/Encoder
Check encoder output with an oscilloscope. Ensure that zero pulse is visible. Ensure that signal amplitude is > 1.2.
Can you publish your oscilloscope screen image with zero pulse visible? I don't think that problem is in software. State mask 0x8 is problem with encoder pulses.
You can see here: https://github.com/iliasam/OpenTOFLidar/wiki/Encoder that "zero pulse" is keeping high polarity with my hardware. Zero position -> no light -> no current through opto-transtor -> Encoder output is pulled...
State mask: 0x28 You can see here: https://github.com/iliasam/OpenTOFLidar/wiki/State-Mask-bits-description bit3 (0x8) - Wrong number of encoder events. Encoder is dirty or wrong installed bit5 (0x20) - Mirror speed is too low...
Check output of the encoder with oscilloscope (at the line at main Lidar PCB). Ensure that opto-interrupter output in at high state when opto-interrupter light is closed. You can try...
Maybe yes. You can try to change position of the opto-interrupter sensor.
Have you changed "ENCODER_HOLES_CNT" value in your code to "20"?
Try to increase ENCODER_TIMEOUT_MS value to 10. "Do I need to calibrate the walking error again after downloading the scanning program?" I think - no. Please make a screenshot with...