Lilypad on the move

Hi all,

Recently i got this project on making use of lilypad to sense the motion/movement if the user is doing an exercise.

How am i going to combine the accelerometer with the main board in this situation can anyone help me…

There is a special lilypad accelerometer board:

Yup. I have this component in front of me. So i program onto this board to track the motion or do i have to connect it onto the main board and write some program in it?

The accelerometer isn’t a microcontroller, you don’t program it. You instead program the “main board” - the lilypad, which contains the atmega chip, much like you would program a normal arduino (e.g. the 2009) to get readings from an accelerometer.

From what I recall, the accelerometer is of the ADX3xx series, which means you could use the examples included the the arduino IDE (File → Examples → Sensors → ADXL3xx)

So can i say that if i want my design to have Vibe board / led light or any other features i just need to only program the Lilypad main board?

Then how i am able to link the various board to the lilypad main board?

thanks a lot i really appreciate Ur help… I am pulling all my hair out :’(

Yes, each of these is a component… the only thing that does any thinking is the main board. To link them you have two options.

The first is for prototyping. Use jumper wires with alligator clips at each end to hook up the components to the lilypad. I know radioshack sells them (if your in the US), but I can’t seem to find their product page… I hope you get what I’m talking about, 'cause these are very useful, in fact, I would say they are the only effective way to prototype with lilypads…

The second way is for your final project. It’s conductive thread.

Can you re-outline your project by the way? It sounds interesting, but I am worried it may not be as simple as you imagine (unless I am misunderstanding what you said before)

Hi,

Yup i do have the conductive thread u are talking about.

Aright My Project is to create a device which would help to count and record the number of exercise you have done (For example : the number of times you swing your arms) and transfer it into the computer.

So i need to do some programming in this board, but once again i am not a programmer so is there any open source u came across which is similar to this using the Accelerometer ADXL335 to combine to the 328 Main Board.

And also I had downloaded the Arduino 0016 program and i try out the Blink on it. It cannot be compiled at all so should i try Arduino 0016 on this 328 Main board?

Uhhh… ok, well, first off, there’s a new version, 017 is the current one actually. http://arduino.cc/en/Main/Software

Now, as for the blinking, have you selected the correct board in the IDE?

Actually, take a look at this:

http://web.media.mit.edu/~leah/LilyPad/01_computer_attach.html

Go through the entire thing, it should clear up any minor issues you are having that you shouldn’t be having.

Yup i did accordingly to this and follow this where the error appear
http://www.ladyada.net/learn/arduino/help.html

I got the avrdude: stk500_getsync(): not in sync:resp=0x00

error. and i try all the things as state below but it doesnt work

So u mean i can program the boad with 0017 instead of 0016

You should always use the newest version of the IDE. That’s probably why the error occurs.

If not, are you sure your selecting the CORRECT board? The lilypad comes in two versions (168 and 328), make sure you’re selecting the right one.

Yup i am using 328… nevermind i will try using the Diecimila Arduino to see if it work. have you came across any website that has coding similar to my situation? :slight_smile:

I did a similar thing for a project (a glove that detects tilt)

I can put up the code when I get home.

THANKS A LOT!!

Is it able to take count?

Takes count?

able to note/ record the number of swing u made n save it in the lilyboard

That was not part of my code, but it could be done. You should start out from the basics tho, get the lilypad to read data from the accelerometer… as for my code, it seems I have deleted it accidentally a while back.

Use the example code for the accelerometer (I referred to it in a previous post), and change it up for your setup (e.g.: the pins you use)

Did you ever get a program to upload btw? That was kind of an important problem to get resolved.

Yup… i got the blink uploaded… Now the Lilypad will blink but when i plug in it will also blink so it doesn’t make a different but this time i am able to see Done Uploading frond the Program.

Use the example code for the accelerometer ? - does it means i Program it in the lilypad but for the accelerometer?

O ya! 1 very important question if i were to use the conductive thread to combine the accelerometer and the lily pad up do i need to follow a protocol to do it as i see the lilypad has number indicated at each of the tiny holes…

The acceleometer needs to be connected to +5V, Gnd, and 3 analog pins.

Whichever pins you connect it too, those are the ones you program the lilypad to read from.