This is a webpage about a project I did in my computer class. I had to make a robotic arm out of Legos. After I finished making it, I programmed it to pick up and drop off legos. I had to figure out at what angle for the arm to pick it up and at which angle to drop them at. The place.all procedure put one lego in the farthest bin and two in the closer bin. Below is a picture of the robotic arm and the procedures I wrote:
to place.distant
pick.from.chute
hand.close
talkto "motora setright
on
waituntil [angle5 < -62]
off
hand.open
end
to place.local
pick.from.chute
hand.close
talkto "motora setright
on
waituntil [angle5 < -49]
off
hand.open
end
to pick.from.chute
talkto "motora setleft
on waituntil [angle5 > 0]
off
end
to hand.open
talkto "motorb setleft
onfor 2.5
end
to hand.close
talkto "motorb setright
onfor 5
end
to place.all
place.local
place.distant
place.local
end
Click here to see how I made the arm sort the legos by color.