![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgELcSnBZm2_taBayAdWK5mqevC-OH8708JPKWoyP1IyfzgqBBas7m35swnUl3B6UN_eirXHatrcKArWrzn93tidWMtXe8hvphZPXFVXntMwsmkfgbe19IF6ZiR6hu4jrO1XkQGKOwDVjAf/s320/Arduino+InputShield+perspective.jpg)
I glued a small vibrator motor to the back of the board too, so it can be used to give a little bit of "force feedback" :-) I don't have a clean shot of the back yet, but here are some up-close pictures. You can see the double-stacked right angle female pin header on the top of the board, which I put so I can still fit solid core wires in and access power, ground, and the other digital pins (for when I wire up an accelerometer):
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOWqKvcVghi7jAHpNA4ulrTAdeTqW1p7A95k0xdz4_CtXcIQ7fmqpSxRzZ_Nt4XuYZ-ALk83nSXOMSYI8x40aJzZUlrumtWpWOYJZz2vcbJmn6xLFo2Q_P9aAR7SoeaH0n6PtFYJP_1KQN/s320/Arduino+InputShield+up+close+2.jpg)
The InputShield comes with PCB traces for different types of layouts (partly because Chris is a lefty and I'm a righty). That way, when it's a kit, I can solder the joystick or buttons in one configuration or the other:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgL53824Y9dIv8xGyvOkFseSoYyBWj6S0bYCMTqfPp-gx9aUq4WVJHraQew3I6BUOc3ap7RAibFvHsSe5jcpTrdDmF9BBFJhF3vAxlE8SAgg1QK88UkvHDu_AD2db58K-oKeS6kBdhFmP2v/s320/Arduino+InputShield+top.jpg)
My friend showed me how to take 3D perspective shots like he used to, so believe it or not... I actually took this photo! (no, seriously... although I didn't set up the lighting or the camera settings - I don't even know what camera settings mean or do):
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5s6e-hy10_WOSinrlvfD1tziBooA8ya-9h-nKDC9jejSmVqVcep9CifczUNDhNE1aa8thT_s559MByNK2WqyBJo-OJPuvx6TS6EVMBqArrOO7NuEfZYjNjn_lK23BetTqviNlITlTSVtO/s320/Arduino+InputShield+shiny+small.jpg)
I spent almost all weekend soldering a few of these up, and then taking photos with the camera (they're all on Flickr), and I also wrote some small code to read the values using the Arduino:
void setup()
{
Serial.begin(9600);
pinMode(7,OUTPUT);
digitalWrite(7,LOW);
pinMode(11,OUTPUT);
digitalWrite(11,HIGH);
digitalWrite(4, HIGH); pinMode(4, INPUT);
digitalWrite(5, HIGH); pinMode(5, INPUT);
digitalWrite(6, HIGH); pinMode(6, INPUT);
digitalWrite(8, HIGH); pinMode(8, INPUT);
digitalWrite(9, HIGH); pinMode(9, INPUT);
digitalWrite(10, HIGH); pinMode(10, INPUT);
}
void loop()
{
Serial.print(" L1: ");
Serial.print((unsigned int)analogRead(5));
Serial.print(" V1: ");
Serial.print((unsigned int)analogRead(4));
Serial.print(" L2: ");
Serial.print((unsigned int)analogRead(3));
Serial.print(" V2: ");
Serial.print((unsigned int)analogRead(2));
Serial.print(" B1: ");
Serial.print((unsigned int)digitalRead(4));
Serial.print(" B2: ");
Serial.print((unsigned int)digitalRead(5));
Serial.print(" B3: ");
Serial.print((unsigned int)digitalRead(6));
Serial.print(" B5: ");
Serial.print((unsigned int)digitalRead(8));
Serial.print(" B6: ");
Serial.print((unsigned int)digitalRead(9));
Serial.print(" B7: ");
Serial.print((unsigned int)digitalRead(10));
Serial.print("\n");
digitalWrite(7,LOW);
delay(200);
digitalWrite(7,HIGH);
delay(200);
}
I'll put the InputShield up on the store over at Liquidware... and I'll also upload a couple of videos of the other stuff I made with it.
No comments:
Post a Comment