Devices & Components
Arduino Uno Rev3
Vibration motor
1N4007 – High Voltage, High Current Rated Diode
General Purpose Transistor NPN
Capacitor 100 nF
Resistor 1k ohm
Switch regulator 3.3v 1A
Hardware & Tools
Hot glue gun (generic)
Soldering iron (generic)
Project description
Code
Right hand
arduino
1 const int motorPin1 = 3; 2 const int motorPin2 = 5; 3 const int motorPin3 = 6; 4 const int motorPin4 = 9; 5 const int motorPin5 = 10; 6 7void setup() { 8 pinMode(motorPin1, OUTPUT); 9 pinMode(motorPin2, OUTPUT); 10 pinMode(motorPin3, OUTPUT); 11 pinMode(motorPin4, OUTPUT); 12 pinMode(motorPin5, OUTPUT); 13} 14 15void loop() { 16 ramp(motorPin1); 17 ramp(motorPin2); 18 ramp(motorPin3); 19 ramp(motorPin4); 20 ramp(motorPin5); 21} 22 23void ramp(int motorPin) { 24 int randn; 25 randn = random(10); 26 for (int intensity = 0; intensity < 250; intensity++) { analogWrite(motorPin, intensity); delay(randn); } randn = random(20); for (int intensity = 250; intensity > 0; intensity--) { 27 28 analogWrite(motorPin, intensity); 29 delay(randn); 30 } 31}
Left hand
arduino
1 const int motorPin1 = 3; 2 const int motorPin2 = 5; 3 const int 4 motorPin3 = 6; 5 const int motorPin4 = 9; 6 const int motorPin5 = 10; 7 8 int randTime = 0; 9 10void setup() { 11 pinMode(motorPin1, OUTPUT); 12 pinMode(motorPin2, 13 OUTPUT); 14 pinMode(motorPin3, OUTPUT); 15 pinMode(motorPin4, OUTPUT); 16 pinMode(motorPin5, 17 OUTPUT); 18} 19 20void loop() { 21 steady(motorPin1); 22 steady(motorPin2); 23 24 steady(motorPin3); 25 steady(motorPin4); 26 steady(motorPin5); 27} 28 29void 30 steady(int motorPin) { 31 randTime = random(250); 32 analogWrite(motorPin, 250); 33 34 delay(randTime+50); 35 analogWrite(motorPin, 0); 36}
Right hand
arduino
1 const int motorPin1 = 3; 2 const int motorPin2 = 5; 3 const int motorPin3 = 6; 4 const int motorPin4 = 9; 5 const int motorPin5 = 10; 6 7void setup() { 8 pinMode(motorPin1, OUTPUT); 9 pinMode(motorPin2, OUTPUT); 10 pinMode(motorPin3, OUTPUT); 11 pinMode(motorPin4, OUTPUT); 12 pinMode(motorPin5, OUTPUT); 13} 14 15void loop() { 16 ramp(motorPin1); 17 ramp(motorPin2); 18 ramp(motorPin3); 19 ramp(motorPin4); 20 ramp(motorPin5); 21} 22 23void ramp(int motorPin) { 24 int randn; 25 randn = random(10); 26 for (int intensity = 0; intensity < 250; intensity++) { analogWrite(motorPin, intensity); delay(randn); } randn = random(20); for (int intensity = 250; intensity > 0; intensity--) { 27 28 analogWrite(motorPin, intensity); 29 delay(randn); 30 } 31}
Left hand
arduino
1 const int motorPin1 = 3; 2 const int motorPin2 = 5; 3 const int motorPin3 = 6; 4 const int motorPin4 = 9; 5 const int motorPin5 = 10; 6 int randTime = 0; 7 8void setup() { 9 pinMode(motorPin1, OUTPUT); 10 pinMode(motorPin2, OUTPUT); 11 pinMode(motorPin3, OUTPUT); 12 pinMode(motorPin4, OUTPUT); 13 pinMode(motorPin5, OUTPUT); 14} 15 16void loop() { 17 steady(motorPin1); 18 steady(motorPin2); 19 steady(motorPin3); 20 steady(motorPin4); 21 steady(motorPin5); 22} 23 24void steady(int motorPin) { 25 randTime = random(250); 26 analogWrite(motorPin, 250); 27 delay(randTime+50); 28 analogWrite(motorPin, 0); 29}
Downloadable files
Fingerscan - schematics
see: https://goo.gl/9Gb5cq
Fingerscan - schematics

Comments
Only logged in users can leave comments