Hey there,
I'm having some issues getting the YABR code working. I've got the same hardware as mentioned in your project. An Arduino Uno (SMD version, should not differ, as far as I researched) and CNC Shield. It seems the code fails on following line:
TIMSK2 |= (1 << OCIE2A);
The result of running the YABR code are two non functional stepper motors. One of them can be moved by hand, the other one being blocked at a position. Both are producing some noise. I checked the current limit on the driver and used other motor drivers. Unfortunately without success.
I tried to increase OCR2A = 39;
to 3999999
which should result in a timer interrupt every 2 seconds instead the 20 µs, but looking into serial output the timer would still spam the code, way faster than 2 seconds.
I replaced the Arduino with another one (different brand, same processor, not SMD). Same behavior there.
I replaced the writing to PORTD
with digitalWrite()
but had no luck either.
Could it be possible that I'm missing out on some point not mentioned in the guide?
Greetings,
Niko