This is the first step of creating a 3D controller to be used with the LittleArm. Eventually we will create a rig that tracks two hands in order to control the Littlearm in 3D.
This project is meant to give a basic introduction to using the ultrasonic sensor with some new hardware that we have started using.
DemonstrationThe main new piece is the Meped board. The board allows you to quickly add sensors without having to mess with a bunch of wiring diagrams. It is basically plug-and-play so you can focus on programming.
The code is actually pretty simple. We just the standard LittleArm firmware to work with an Arduino Nano and then added in a check on the ultrasonic sensor if no serial commands were available.
The only part of the code that might need to be different from one arm to the next is the range of the sensor and of the joint angles. Based on how the kit was put together, the optimum values may be different.
if ((readDistance > 3 )&& (readDistance < 30)){
//move the elbow and shoulder some amount
desiredAngle.elbow = map(readDistance, 5, 30, 175, 70);
desiredAngle.shoulder = map(readDistance, 5, 30, 5, 100);
desiredAngle.base = 90;
}
This is a very basic demo. But as said before, this will be expanded with another sensor soon to allow the arm to be moved from side to side as well as up and down. Then if we replace the gripper with a hook, it could be a pretty cool robot.
Comments
Please log in or sign up to comment.