semicolo:
This works on an arduino 2009, the rest of the sketch I used to test is:void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
// lcd.print("hello, world!");
lcd.print ( TiempoTotal (1000));
}void loop() {
}
Hello Semicolo, thanks for your response.
Here a sample of program :
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
// initialize the library with the numbers of the interface pins
void setup() {
lcd.begin(16, 2);
}
void loop() {
lcd.clear();
lcd.print ( TiempoTotal (1000));
delay(1000);
}
String TiempoTotal (unsigned long Cantidad){
unsigned long TT = Cantidad;
unsigned long Remanente1 = (TT % 3600);
unsigned long H = (TT - Remanente1)/3600;
unsigned long S = Remanente1 % 60;
unsigned long M = ( Remanente1 - S) / 60;
String Hs= String(H);
if (H < 10) Hs= "0" + Hs;
String Min = String(M);
if (M < 10) Min= "0" + Min;
String Seg = String(S);
if (S < 10) Seg= "0" + Seg;
return " " + Hs + "Hs. " + Min + "m. "+ Seg + "s. ";
}
The display lcd show some strange signs, then shows nothing more ...
will display problem ?
May be because I use pins 6 and 7? (for others applications works fine)
Can you help me?
Thanks!