Conversion issue: display LM35 on a 16x2


on mega board, lm35 , lcd keypad shield connected, noticed not manages directly temperature reading.
if print on display variable, can read strange symbols.
i managed find way convert temperature reading in valid number suitable passed display, failed.

this part of code wrote , not working.

code: [select]

void setup() {                              
 pinmode(sonda_refrigerata, input);  
 pinmode(sonda_birra, input);

lcd.init();
 lcd.clear();
 lcd.cursorto(1, 0);
 lcd.printin("birra");
 lcd.cursorto(2, 0);
 lcd.printin("refr.");
 lcd.cursorto(1, 10);
 lcd.printin("set");
 lcd.cursorto(2, 10);
 lcd.printin("set");
 
}
void loop() {
 lettura_birra = analogread(sonda_birra);              
 lettura_refrigerata = analogread (sonda_refrigerata);                
 temp_birra = (5.0 * lettura_birra * 100.0)/1024.0;  
 temp_ref = (5.0 * lettura_refrigerata * 100.0)/1024.0;
 lcd.cursorto(1, 7);
 lcd.print(temp_birra);
 lcd.cursorto(2, 7);
 lcd.print(temp_ref);
 lcd.cursorto(1, 14);
 lcd.print(setpoint_birra);
 lcd.cursorto(2, 14);
 lcd.print(setpoint_ref);
}

you need post of code. specifically, lcd library using?


Arduino Forum > Forum 2005-2010 (read only) > Software > Interfacing > Conversion issue: display LM35 on a 16x2


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums