Posts Tagged ‘Arduino’

A cute soft circuit project

October 6th, 2009

Here’s a soft circuit with 2 LEDs and a button. It is basically an electronic sock puppet.

I used a sock covered in a knitted bag. The button is a sewing snap. When the mouth closes, the button returns a 1 and the LEDs flicker.

height="850" codebase='http://www.apple.com/qtactivex/qtplugin.cab'> controller="true" loop="false" pluginspage='http://www.apple.com/quicktime/download/'>

Here’s the code

#define btn 4
#define led1 3
#define led2 9
int btnState;

void setup(){
pinMode(led1,OUTPUT);
pinMode(led2,OUTPUT);
pinMode(btn,INPUT);

}

void loop(){
btnState=digitalRead(btn);
if(btnState){
for(int i=50;i<255;i+=5){
analogWrite(led1,i);
analogWrite(led2,i);
delay(10);
}
for(int i=255;i>100;i-=5){
analogWrite(led1,i);
analogWrite(led2,i);
delay(10);
}
}else{
digitalWrite(led1,LOW);
digitalWrite(led2,LOW);
}
Serial.println(digitalRead(btn));
}

Freeduinos!

September 30th, 2009

Both my middle school and high school classes worked on putting together the Freeduino kits.
yhst-82942516561161_2071_4704635
In order to avoid any soldering mistakes, I asked students to place all there resistors in the board first, and once I checked them, they could solder away. Capacitors were next, then LEDs then everything else. The middle school class had more success with putting the kits together quickly. Maybe soldering was more of a novelty for them? They completed their boards within two classes, but the high school students had the potential to drag the process into a third class. Rather than do that, I finished all but one of the boards. There was one high school student who completed his Freeduino over the weekend and worked on the Proto Shield from Adafruit in class.

My intention was to also have both groups make Proto Shields, but now I’m thinking that that project should be optional.