Quantcast
Channel: Learn with BlocklyProp — Parallax Forums
Viewing all articles
Browse latest Browse all 293

Servo 360 and Blockly

$
0
0
I'm designing a robot arm for the local HS robotics class. It uses Servo 360s for positioning. Each axis is designed to accommodate positions from 5 to 355 degrees. When the servo is at position 300, say, and I command to go to position 10, it needs to go in a negative direction from 300 to 10. Unfortunately, the Blockly code tries to make it go forward through 0 to get to 10 (i.e. the shortest route). But this causes the robot arm to hit a stop and stall, because it can't go that way past 355.

1. How do I specify that it must stay within bounds and not cross zero to reach its target?

Also, when it's on position, the dead zone is about 9 degrees wide, causing quite a bit of backlash and imprecision. That won't work for this app.

2. How do I narrow the dead zone?

Thanks,
-Phil

Viewing all articles
Browse latest Browse all 293

Trending Articles