Using buttons - Lilypad Development Board

Hi all,

I bought a Lilypad Development Board a few months ago and have finally dug it out today.

I've got digital and analog writing to the plain white LEDs and the RGB LED (managed to get a nice rainbow fade working).

I can't seem to get anything working with the buttons though - either the pushbutton (on pin A5) or the switch (on pin 2). I've not snapped the board apart so the default pins should still be connected.

I've tried switching LEDs on and also using the serial monitor (code for the latter pasted below).

Any ideas what I'm doing wrong?

int buttonPin = 2;
int value;

void setup() {

void loop()
  value = digitalRead(buttonPin);
  if (value == HIGH) {
  } else {

you may want to enable the internal pull-up resistor.

You can do this when you call pinMode:

pinMode(buttonPin, INPUT_PULLUP);