Grab a Cup with the NeuroMaker Hand
Welcome to programming the NeuroMaker Hand using C++ programming! In this project, we are going to create sample code that will allow us to make finger movements that will allow us to grasp a cup and other wider objects!
Estimated Time
Approximately 1 hour
Number of People
1-4 students for each available NeuroMaker Hand
Necessary Supplies
- One fully built NeuroMaker Hand
- One MacOS, Windows or Chrome OS computer
- Arduino Online Editor with Arduino Create Agent fully installed
- A cup made of paper, plastic or other light material
Necessary Program Files
- Please see the code breakdown in the below instructions
Preparations
- Please ensure that the NeuroMaker Hand has working batteries. Additional power lights on the power board of the Hand should turn on when the on/off switch has been turn on. If your fingers move erratically or don’t move it all after uploading the below code this could mean that your batteries are running low.
- Please ensure that the Arduino Create Agent and Arduino Online Editor are safe listed on your district firewall. Instructions for IT personnel is provided here: Arduino Editor Safe listing Guide
- In case you have not yet installed the Arduino Editor, please complete the Set Up C++ Coding Environment Project
Background
If you completed the project to grasp a pen, you will now be introduced to a new kind of grip! Instead of the pinch grip we used to pick up a pen, we will now need to employ a new kind of grip in order to pick up wider and bulkier objects. In order for the human hand to comfortably and securely grasp a larger object, we will need to use all 5 of our fingers. Luckily, in this project we are going to code a grip that will allow us to do just this! The power grip we will code into our model prosthetic hand will allow us to have a stronger grip on objects that require more force to stay in a particular position.
Project Instructions
Please follow the instructions in the following presentation walkthrough!
Grab a Cup with the NeuroMaker Hand Walkthrough
*Please note, in case objects slip out of your NeuroMaker Hand, consider adding some friction to the fingers with a rubber glove, tape or other materials.
For your convenience, the code in this project has been provided below:
/* This program lets the hand grab a cup. */ //include the servo library to control the servo motors #include <Servo.h> //create 5 servos in an array Servo servos[5]; //set up servo motors of fingers//set up servo motors of fingers void setup() { //servos 0, 1, 2, 3, and 4 move the thumb, index, middle, ring, and pinkie fingers respectively. servos[0].attach(6); servos[1].attach(5); servos[2].attach(4); servos[3].attach(3); servos[4].attach(2); //start with all fingers up openHand(); //wait 3 sec (at this point, place cup by the palm) delay(3000); } void closeHand() { //servos close all the fingers to wrap around cup servos[0].write(180); servos[1].write(0); servos[2].write(180); servos[3].write(180); servos[4].write(0); return; } void openHand() { //fingers open up servos[0].write(0); servos[1].write(180); servos[2].write(0); servos[3].write(0); servos[4].write(180); return; } void loop() { //close hand around cup closeHand() }