counter

so im doing a counter till the holidays occur this is what i have so far so if you can rewrite it to where it count down day by day by the button i use in the project that would be great

//time to go
//hw

#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int a =0;
int e = 7;

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("halloween count");
pinMode(e,INPUT);
}

void loop() {
int button = digitalRead(e);

lcd.setCursor(3, 1);
lcd.print(a);

if (button == HIGH) {
a ++;
lcd.setCursor(3, 1);
lcd.print(a);
delay(200);
}
}

change a++ into a--?

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom.... :slight_smile: