Back to articles
Step 4: Controlling Direction — and Starting to Track Position
News

Step 4: Controlling Direction — and Starting to Track Position

via Dev.toEric Park

Step 4: Controlling Direction — and Starting to Track Position Hello everyone. This is Eric Park, 3D Printer Engineer from South Korea. Quick recap before we start: Step 1 : Made the motor spin for the first time — 200 pulses, one full revolution. Step 2 : Controlled speed by changing the delay between pulses. Step 3 : Built a rotateAngle() function — enter an angle, the code calculates the steps. Step 4 (today) : The motor can now rotate both clockwise and counterclockwise. And we start tracking the current angle. What Was Still Missing After Step 3 After Step 3, I had a working rotateAngle() function. But it always rotated in the same direction. My motor was stuck going one way. For anything useful — a printer head moving left and right, a robotic arm returning to start — you need both directions. Step 4 adds that. And once you have bidirectional movement, a natural question comes up: where is the motor right now? Step 4 introduces a simple way to track that. How Direction Control Wo

Continue reading on Dev.to

Opens in a new tab

Read Full Article
6 views

Related Articles