Instructables

How to Build a Robotic Hand with Haptic Feedback

FeaturedContest Winner

Step 7: Program the Hand

I have attached the code from my first version. That time, I used two regular Arduinos since I needed 8 Analog In pins. It also isolated the two processes going on: positioning the fingers and measuring the pressures. For my second version (this version) I used an Arduino Mega, so I could fit all of the inputs on one board. As for the code, I pretty much copied and pasted the servo positioning into the pressure reading loop and changed the pin labels around.

**Important**
For the servo positioning, there still needs to be some work done on limiting the rotation. If they rotate too far, something may break. This is how I broke the finger. 

As I said in the intro, I will always come back to this project to try to improve it bit by bit. Since this is one of my first Arduino programs, there are most likely some inefficiencies in the code. Feel free to post potential modifications. 
 
Remove these adsRemove these ads by Signing Up