trying to adjust a setpoint

Ok, I have had my arduino for a week now, and have been having lots of fun with it. Now I am trying to write a program that will control the temp of a item. The problem that I am having is adjusting the set point up and down. just wont do it. Here is my code so far. I tried to do it from the Java console and I received nothing but errors but here it is.

#include <LiquidCrystal.h>

LiquidCrystal lcd( 8, 9, 4, 5, 6, 7);

int setPup = 3; // setpoint up
int setDown = 10; // setpoint down
int analogPin = 0; // voltage divider network on pin analog 0
// it will become pin 1 for the Thermister.
int val = 0; // where it will store the input
int setpoint = 250; // trying to get a setpoint for temp control

void setup()
lcd.begin(20, 2); // this gave me a head ache for a few days, I thought my display was bad lol
Serial.begin(9600); // setup serial, and testing for me.
pinMode (setPup, INPUT); // raise setpoint
pinMode (setDown, INPUT); // lower setpoint

void loop()

val = analogRead(analogPin); // read the input pin
val = map(val, 0, 1023, 0, 350); // remapped the value for the smokers temp probe
Serial.println(val); // bug checking
lcd.setCursor(0,0); // sets the position of the cursor
lcd.print(“dans smoker”); // it belonges to him
lcd.setCursor(13,0); // this is where the temp goes
lcd.print(val); // mapped version of the temp on screen
lcd.setCursor(13,1); // set the cursor for setpoint display
lcd.print(setpoint); // setpoint display
delay(500); // needs to be removed after it is running
if (setPup > 1) ++ setpoint;
if (setDown > 1) – setpoint;

Both "setPup" and "setDown" are > 1, so the setpoint will never vary.

You need to read the corresponding pins.

(What is wrong with the forum today?)

Thanks AWOL, that was the problem. Working better, just have to get a pull down resistor on it to keep it from counting now. Thanks

Working better, just have to get a pull down resistor on it to keep it from counting now.

Invert your logic, and use the built-in pullups - saves external components.

Thank you again! I am still learing this stuff, but I think that I am getting the hang of it.

Ok gave up on the buttons, (external componets) I have the lcd display from RobotShop, and it has 5 buttons going into the Analog pin 0 on a voltage divider network, and I have it working (adjusting the set point up and down. I had a problem with the value floating above and below the == value that I had for a value. I just mapped it to a lower value (it was 0 to 1023 and is now 0 to 50). But it is working like a champ and I celebrated with a beer. Next comes controlling a fan in referance to the temp and setpoint. Fun fun!