ラベル LilyPad の投稿を表示しています。 すべての投稿を表示
ラベル LilyPad の投稿を表示しています。 すべての投稿を表示

2010年6月15日火曜日

Make a simple work with Lily Pad Arduino


LilyPad Arduino is a wearable Arduino.

It uses conduct threads in stead of regular metal wires so that it enable to make a wearable art work or interactive wall cloth.

I did a following experiment with Lily pad; however, I do not recommend you to do a same thing with me since I did not planed perfectly and it was the first time trial. 

I made a gloves with LED. If I press or hold something with finger, the color of LED will be changed. 

Requirement

Lily pad Arduino

conduct thread

power supply for Lily pad Arduino

AAA battery  

10K resistor

Force sensor

LED that came with Lily Pad

Sewing Stuffs (needle, thread)

Cloth or material which you want to be sewed 





Warning: this experiment potentially causes unexpected danger to you and Arduino.

Be safe when you do a experiment with Lily Pad.

If you find anything that unexpected result, plug out power charger( USB or battery ).

I actually almost broke down the circuit of the LilyPad because of shorts of the circuit.

First thing that you need to do is to imagine the final form of the circuit.

It must be better to spend a time to figure out how you sew thread to the glove.

I am sure that you will encounter a lot of problems while you are sewing since I also encountered a lot of problems.

Basic idea of circuit









As you see some of the threads nearly touch each other, that really bad.

I should have planned more nicely.



Program


int ledPin=10; // declare variables
int ledPin2=10;
int pressure=0;
int val,val2;
void setup()
{
  pinMode(ledPin, OUTPUT); //setup pin
}
void loop()
{
  val = analogRead(pressure)/4;

//load data and convert it to suitable value for PWM
val2 = 255-val;

//load data and convert it to suitable value for PWM
analogWrite(ledPin, val);
delay(400);
analogWrite(ledPin, val2);
delay(400);
}







2010年6月10日木曜日

LilyPad Arduino



Testing LilyPad Arduino

http://arduino.cc/en/Guide/ArduinoLilyPad






test based on a webpage

http://web.media.mit.edu/~leah/LilyPad/06_rgb.html

instead of using 9,10,11 and 5V pins I use 3,5,6 and 13 pins.

The pins 3,5,6,9,10, and 11 have a function of pwm.

From the test, I conform that the function of pwm is available.



LilyPad + LEDs + Buzzer

I added following cords.

int soundPin=2; 

int frequency;

pinMode(soundPin,OUTPUT);


frequency=random(800,3000);
tone(soundPin, frequency,5000);
delay(100);

I did a test of temp. sensor but I do not know whether temp. sensor works properly or not.


Stand alone lilypad

 




Accelerometer test

instruction

Connect X,Y, and Z of the accelerometer to the analog input 0, 1, and 2 respectively.

Also connect 5V and ground.

int pinX=0;
int pinY=1;
int pinZ=2;
int dataX,dataY,dataZ;

void setup()
{
Serial.begin(9600);
}
void loop()
{
dataX=analogRead(pinX);
dataY=analogRead(pinY);
dataZ=analogRead(pinZ);
Serial.print(dataX);
Serial.print("-");
Serial.print(dataY);
Serial.print("-");
Serial.println(dataZ);

delay(100);
}