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.
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
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
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;