Grasp Different Objects with the NeuroMaker Hand
Welcome to programming the NeuroMaker Hand using C++ programming! In this project, we would like to challenge you to brainstorm different code to pick up 10 different objects around you using different grips!
Estimated Time
Approximately 1 to 4 hours depending on how many objects you like to grab!
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
- 10 objects of different sizes and shapes that you would pick up normally with one hand. Balls, keys, disposable batteries, clothes hooks etc. are all great choices!
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
- Please ensure objects you select to grab weight less than 2 pounds to ensure proper hand grips.
Background
If you are reading this after completing previous coding projects, congratulations! We are going to challenge you in this project to think like a real Biomedical Engineer and design code that can assist a prosthetic hand pick up multiples kinds of different objects. This project will require some planning and testing in order to create some successful tests. Following the prompts and hints in the instructions below, you will be challenged to pick up and hold onto 10 different objects you can find around you.
Biomedical Engineers creating real prosthetics products must be able to demonstrate that some key motions and common hand grips can be achieved using a prosthetic hand prototype. Much like our engineers experienced during our design phase, we would like you to think of different grips, control motions and reproducible code that can manipulate objects around you. In case you are looking for some inspiration, feel free to view some sample grips and strength considerations in these outside articles provided:
The Different Ways We Use Our Hands to Grasp, Hold, Move and Manipulate Objects
Project Instructions
Please follow the instructions in the following presentation walkthrough!
Grab and Manipulate Objects 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:
/* * Servo.h is a library that is needed to control the * servo motors in a straightforward way. * You should always include libraries at the start of your code. */ #include <Servo.h> /* * C++ is a great language for object oriented programming. You can treat * "Servo" as a blueprint to create servo motor objects. When we say * "Servo servos", we are creating an object called "servos", using the * blueprint "Servo". This will make sure that "servos" inherits all the * properties that a servo motor needs. The "[5]" attached at the end simply means * we created 5 servo motors, from #0 to #4, saved in an array. */ Servo servos[5]; //creates an array of 5 servo objects /* * This is the initial setup of the code. It attaches each servo motors we just created to * a specific pin# on the actual hardware. Servo number 0-4 corresponds to thumb, index finger, * middle finger, ring finger and little finger. */ void setup() { // put your setup code here, to run once: servos[0].attach(6); servos[1].attach(5); servos[2].attach(4); servos[3].attach(3); servos[4].attach(2); //resets the hand upon startup resetFingers(); delay(1000); //delays the program by 1000 miliseconds (1 second) } /* * This is "void resetFingers" is what we know as a function. The name of the function is resetFingers, and the return * type is void, meaning it does not need to return anything. This function moves all the fingers into a paper like gesture */ void resetFingers() { servos[0].write(0); servos[1].write(180); servos[2].write(0); servos[3].write(0); servos[4].write(180); } /* * Below are examples of void functions that make various grips. * Students are expected to recreate some of these grips and attempt to grab various objects. */ //used for grabbing cylindrical and spherical objects. This grip can also be used to hook/hold objects like bags. //fully contracts all 5 fingers void basicGrab() { servos[0].write(180); servos[1].write(0); servos[2].write(180); servos[3].write(180); servos[4].write(0); } //This grip pinches down on the target, making it useful when dealing with flat objects. //contracts the thumb, index, and middle finger; opens the ring and pinky finger. void palmarGrab() { servos[0].write(180); servos[1].write(0); servos[2].write(180); servos[3].write(0); servos[4].write(180); } //The pinch is very similar to the palmar grip, except without the use of the middle finger. //contracts the thumb and index finger; opens the middle, ring, and pinky finger. void pinch() { servos[0].write(180); servos[1].write(0); servos[2].write(0); servos[3].write(0); servos[4].write(180); } //This grasp holds the object in between the thumb and the index finger. Good for firmly grasping flat objects. //contracts all fingers, but only the thumb and index are used void lateralPinch() { servos[1].write(0); //servo[1] is the index finger, this will move first to make grabbing the object easier delay(250); //pauses for 1/4 of a second servos[0].write(180); //servo[0] moves the thumb into place, grabbing the object servos[2].write(180); servos[3].write(180); servos[4].write(0); } //infinitely loops through all the different grips with a 2.5 second pause in between each one //loop ends once the program is terminated void loop() { basicGrab(); delay(2500); palmarGrab(); delay(2500); pinch(); delay(2500); lateralPinch(); delay(2500); resetFingers(); delay(2500); }