PaxPowerGlove_en の変更点
日本語ページは[[こちら>../PaxPowerGlove]]。
~
#ref(../PaxPowerGlove/powerglove04.jpg,right,around,33%)
&size(30){I want to touch objects in virtual space.};
~
So I set motion sensor in PAX Power Glove, a legendary NES controller, to control the movement of my hand in the virtual space of Unity .
~
#youtube(6coz8Nx0RFI)
~
The original Power Glove generate ultrasonic waves from the two ultrasonic transducers at different times to realize the motion capture.
That idea was great. But it lacked accuracy. So I decided to use motion sensor.
I used only flex sensor, out of original components.
~
So I set motion sensor in PAX Power Glove, a legendary NES controller, to control the movement of my hand in the virtual space of Unity .
#ref(../PaxPowerGlove/board.jpg,around,right,33%)
I made that with following procedure.
+getting value of bending of fingers.
+detecting the movement of my hand with motion sensor.
+Integrating 1 and 2.
+communication by XBee.
+Integrating 3 and 4.
+realizing haptics with vibration motor.
+Integrating 5 and 6.
#clear
&size(30){NOTICE: Oh, Don't you have PowerGlove? Try [["DroidGlove">http://cubic9.com/Devel/OculusRift/DroidGlove_en/]]!};
*Materials
**Hardware
|Item|h
|Arduino|
|PAX PowerGlove|
|Resistance (100k ohm * 4)|
|[[MPU-9150>http://www.invensense.com/products/motion-tracking/9-axis/]]|
**Software
|Item|h
|Arduino IDE|
|Unity3d|
|I2C Device Library|
|C# script for Unity3d|
*1.detecting the movement of my hand with motion sensor.
**Hardware
#ref(../PaxPowerGlove/powerglove_circuit.png,right,around,25%)
+Remove solder. Take off wires from board.
+Connect red wires to GND.
+Connect Other wires to resistance to Arduino's 5V. Connect Analog input between wire and resistance. ~
|finger|wire|analog input|h
|thumb|blue|A0|
|index finger|black|A1|
|middle finger|white|A2|
|ring finger|brown|A3|
|littte finger|no wire|-|
#clear
**Software
+Write following sketch to Arduino.
**Arduino sketch
#code(C,nonumber,nooutline,../PaxPowerGlove/PowerGlove.ino)
NOTE: resistance may be different with your PowerGlove.
*2.detecting the movement of my hand with motion sensor.
for details, see [[../モーションセンサ]]. (written in Japanese)
*3.Integrating 1 and 2.
**Hardware
+Integrate circuit of 1 and 2.
**Software(1):Arduino sketch
+Modify sketch, which you made at [[../モーションセンサ]].
+Modify line 286-297.
#code(C,nonumber,nooutline){{
#ifdef OUTPUT_READABLE_QUATERNION
// display quaternion values in easy matrix form: w x y z
mpu.dmpGetQuaternion(&q, fifoBuffer);
Serial.print("quat\t");
Serial.print(q.w);
Serial.print("\t");
Serial.print(q.x);
Serial.print("\t");
Serial.print(q.y);
Serial.print("\t");
- Serial.println(q.z);
+ Serial.print(q.z);
+ Serial.print("\t");
+ Serial.print(constrain(map(analogRead(A0), 678, 760, 0, 10), 0, 10) * 6);
+ Serial.print("\t");
+ Serial.print(constrain(map(analogRead(A1), 835, 935, 0, 10), 0, 10) * 6);
+ Serial.print("\t");
+ Serial.print(constrain(map(analogRead(A2), 770, 905, 0, 10), 0, 10) * 6);
+ Serial.print("\t");
+ Serial.println(constrain(map(analogRead(A3), 750, 910, 0, 10), 0, 10) * 6);
#endif
}}
**Software (2):Unity project
+Download following zip, and open PaxPowerGlove.unity.
#ref(../PaxPowerGlove/PaxPowerGloveUnity.zip)
**C# script for Unity3d (PaxPowerGlove.zip include this.)
#code(C,nonumber,nooutline,../PaxPowerGlove/ControlHandByPaxPowerGloveAndMPU9150InUnity.cs)
*4.communication by XBee.
#ref(../PaxPowerGlove/xbee.jpg,right,around,33%)
for details, see [[../XBee]]. (written in Japanese)
#clear
*5.Integrating 3 and 4.
+Modify Arduino sketch.~
#code(C,nonumber,nooutline){{
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
Wire.begin();
- TWBR = 24; // 400kHz I2C clock (200kHz if CPU is 8MHz)
+ TWBR = 12; // for Arduino Fio
}}
#code(C,nonumber,nooutline){{
// initialize serial communication
// (115200 chosen because it is required for Teapot Demo output, but it's
// really up to you depending on your project)
- Serial.begin(115200);
+ Serial.begin(57600); // for Arduino Fio
}}
+6.realizing haptics with vibration motor.
**Hardware
#ref(../PaxPowerGlove/vibrate_circuit.png,right,around,25%)
#clear
**Software
W.I.P.
#code(C,nonumber,nooutline){{
char c = Serial.read();
if (c != -1) {
c -= '0';
for (int i = 0; i < 5; i++) {
if ((c & 0b00010000) != 0) {
digitalWrite(3, HIGH);
}
if ((c & 0b00001000) != 0) {
digitalWrite(4, HIGH);
}
if ((c & 0b00000100) != 0) {
digitalWrite(5, HIGH);
}
delay(7);
digitalWrite(3, LOW);
digitalWrite(4, LOW);
digitalWrite(5, LOW);
if ((c & 0b00000010) != 0) {
digitalWrite(6, HIGH);
}
if ((c & 0b00000001) != 0) {
digitalWrite(7, HIGH);
}
delay(7);
digitalWrite(6, LOW);
digitalWrite(7, LOW);
}
}
}}
+7.Integrating 5 and 6.
W.I.P.
*Prototypes
#ref(../PaxPowerGlove/powerglove01.jpg,around,33%)
#ref(../PaxPowerGlove/powerglove02.jpg,around,33%)
#ref(../PaxPowerGlove/powerglove03.jpg,around,33%)
#clear
*Reference
-[[Power Glove を楽器にする - Radium Software>http://d.hatena.ne.jp/KZR/20090817/p1]]
-[[PowerGloveの解析>http://nagasm.org/ASL/globe/]]
-[[Arduino でモータを動かす:息子と一緒に Makers:So-netブログ>http://makers-with-myson.blog.so-net.ne.jp/2013-11-11]]
*Amazon
#amazon(B0044X2E5S,left)
#amazon(B003LJK77I,left)
#amazon(B01CE4D0U6,left)
#amazon(4800711460,left)
#amazon(4873117895,left)
#amazon(4797393521,left)