questions!!!!!!!

Does anyone noes hw to code for an on/off button using lilypad button board .it shd output on when pressed and still on when released.bt off during the nxt press and remained off when released.so it works like a normal on/off button[/font][/size]

does anyone knows the output connection of adxl 335 accelerometer ,tri led,temperature sensor and lilypad buzzer on the lilypad arduino ATmega w/328 board

any idea of the codings for the buzzer ,adxl accelerometer and temperature sensor.

ps:cos i am new to this lilypad thingy ,i really do nt know a lot of things .hahaa

First, not meant as a personal attack but please use colors only when they are functional, one ! mark in the title is more than enough and think about a good title. It will attract the right knowledge far faster than just the word questions. Everybody on this forum has questions, so formulate them in a way that covers the content like "Q: connect lilypad to button, buzzer, tri-led, temp and adxl355 sensor". Finally try to write plain English as not all people on this forum understand your shorthand notations and that might include the person with the answers.

Back to your question:

You should read http://www.arduino.cc/en/Tutorial/Button as this is the basis of what you need.

You will need to add an extra integer variable to hold the state of the light. In one solution this variable should only change state if a button goes from LOW to HIGH. In another solution you could add a counter and you only swutch state of the led if the counter is even.

Testing an integer for evenness is done by a modulo operation -> if (counter % 2 == 0)

When using a counter you can do many more things, like adding another (multicolor) led that only light every 3rd press or every 8th press etc. Or you can use the counter for intensity - http://www.arduino.cc/en/Tutorial/PWM -