Grab a Pen 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 pen and other small 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 pen, pencil or other small cylindrical item to grab with the hand
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
Most prosthetic hands used in the assistive technology field don’t move each finger individually. Instead, each hand gesture a patient wishes to make is provided as a set. For instance, if an amputee wishes to pick up a piece of paper or a pen, that person would press a button or complete a different command that would produce the necessary gesture. Manipulating each finger individually like we do with a natural human hand is very laborious for someone working with a prosthetic. Keeping this in mind, we are going to produce a specific gesture in order to pick up a pen or other small cylindrical object. Upload your code to the hand and see what you can pick up or what other modifications you can make!
Project Instructions
Please follow the instructions in the following presentation walkthrough!
Grab a Pen 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 uses the index finger and thumb to grab a pen. */ //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 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); //place hand is in starting position startingPos(); //wait 3 sec (at this point, place pen between two up fingers) delay(3000); } void startingPos() { //servos close all fingers except thumb and index servos[0].write(0); servos[1].write(180); servos[2].write(180); servos[3].write(180); servos[4].write(0); return; } void loop() { //close fingers to grab pen servos[0].write(180); servos[1].write(0); }