bigtreetech / BIGTREETECH-S42B-V1.0

The closed-loop drive is to feedback the rotation angle of the stepping motor to the control panel, compare the distance that needs to be rotated with the distance of the actual rotation, calculate the error value, and then compensate, so as to prevent the problem of multi-step and lost step. The closed-loop drive can completely overcome the lost step of the open-loop stepping motor, and can also significantly improve the performance of the motor at high speed
109 stars 53 forks source link

Example how to read angle? #49

Closed imperator-maximus closed 3 years ago

imperator-maximus commented 3 years ago

Hi, I already asked for a beginner example https://github.com/bigtreetech/BIGTREETECH-S42B-V1.0/issues/48 but in the meantime I dig into Marlin and it is a crazy overhead but also quite simple to use anyway.

But I am still searching for an example how to read the current target angle (the "Deg" value which is shown on display) in Marlin? Thank you!

imperator-maximus commented 3 years ago

I just found an example in custom firmware here: https://github.com/swanepoeljan/TrueStep/blob/master/firmware/S42BV1.0/Close_loop/src/User/telemetry.c which transfers angle via UART.