clearwater / SwitecX25

Arduino library for Switec X25.168 and friends
http://clearwater.github.com/gaugette/
Other
128 stars 44 forks source link

SwitecX12 libary problem on ESP32 (timing related?) #13

Closed R5fan closed 7 years ago

R5fan commented 7 years ago

The SwitecX12 library works very well using a AX1201728SG controller on an Arduino Uno or nano. However, when compiling the same code for my ESP32, I run in to trouble. The zero command does work , but after that, it runs slowly and keeps moving CCW forever. To make sure the problem isnt with my code, I tried the sample code on your blog, and its the same problem.

I also tried compiling your "hello world" code on your gaugette blog, which does not use X12 library, and that works rather well, some missed steps, but not that different from the Uno. So its not like I misconfigured the pins.

Here's a video showing both: https://youtu.be/jJr1Jizp4ws

I am powering the AX120 and stepper via the 5V USB pin, and I tried different digital pins for step/dir/reset, but it makes no difference. Any ideas?

R5fan commented 7 years ago

Solved it. Same problem and solution as here: https://github.com/clearwater/SwitecX25/pull/11