Class blog for CMU’s Making Things Interactive, Fall, 2008

examples

Post navigation

I mentioned this 3-D capacitive input interface for Arduino (on Instructables.com) in class yesterday. It’s basically one corner of a cube with the 3 sides covered with aluminum foil, attached to the Arduino using shielded cable and a couple of resistors. It claims to report the distance of your hand from each of the three faces of the hemi-cube, so you can those as x, y, z coordinates to control… anything! One idea that springs to mind is setting the R/G/B values for your mood lighting. If it’s accurate enough, you could also try to hack it into your favorite cad program (you *are* already using VR goggles for that, right?)

Cool invention helps tired players bounce back
The device, called the Glove and invented by two Stanford biologists, is used by the Niners during games and at practice for players’ health. But its applications are far broader: from treating stroke and heart attack victims to allowing soldiers to remain in the field longer under intense heat.

First example of having Arduino store a number of button presses.
//--------------------------------------------------------------------------------

/*
* Button
* by Greg Saul
*
* Incriments a counter by one each time a button on 7 is pressed.
*
*/

int ledPin = 13; // choose the pin for the LED
int inputPin = 7; // choose the input pin (for a pushbutton)
int val = 0; // variable for reading the pin status
int counter = 0; // store the number of button presses
boolean buttonDown = false; // a flag that stores if the button is beeing pressed down or not
boolean isLightOn = false; // a flag that stores if the led is on or off

// check if we have just pressed the button down, and if we have incriment the counter
// by one and set the button down flag to on
if (val == HIGH && buttonDown == false) { // check if the input is HIGH and the button is not already been held down
buttonDown = true; // set the button flag to down
counter = counter +1; // add one to the counter
Serial.println(counter); //send the current counter value to the computer
}

//if we are no longer pressing the button down set the buttonDown flag to up
if (val == LOW){
buttonDown = false; // set the buttonDown value to up
}

// if we pressed the button 10 or more times toggle the led.
if(counter >= 10){
toggleLight(); // turn led off and on
counter = 0;
}

}

// Toggle the led on and off.
void toggleLight(){

// if the led is already on turn it off and rember that it's off.
if(isLightOn){
digitalWrite(ledPin,LOW);
}else{
digitalWrite(ledPin,HIGH);
}
isLightOn = !isLightOn; // swap the isLightOn on if it's off and off it's on
}

I’m sure a lot of people have seen the cute little dancing robot Keepon;
He even stars in music video’s

The other thing that many people don’t know is that Keepon was developed to study the mechanisms of social communication of children and to help children developmental disorders such as autism to understand emotive actions.