Menú en LCD gráfico

Hola a todos, gracias por su atención antes de nada:
Quiero hacer un menú en un lcd gráfico. Es para una alarma: conexión y desconexión de sirenas, pánico, activar y desactivar... . He leído acerca de ésto, y no encuentro mucha info. Si alguien tiene experiencia con el tema, o alguna referencia, me gustaría obtener su ayuda.

Muchas gachas por todo. :slight_smile:

Crea diferentes pantallas para el lcd y mételas dentro de un SwitchCase, y depende el botón o lo que pase se active un "case" o otro :wink:

Un saludo!

¿Así de simple? En cada case meto el texto y según el botón pulsado saldrá en el LCD x texto pero,¿ no se quitará el texto? Al ser un botón,cuando deje de pulsarlo se irá.

puedes hacerlo por máquinas de estado como has dicho que estabas mirando. es otra de las opciones

¿Por máquinas de estado? Yo no he dicho nada de eso creo..no se que es..=S

hola, aunque sea un pulsador tu puedes dejarlo activado y a la siguiente vez que actues en el desactivarlo. Te dejo un ejemplo que saque en ingles de lo que te he comentado y modifique para activar un rele, espero que te sirva:

// this constant won't change:
const int button = 2; // the pin that the pushbutton is attached to
const int rele = 11; // the pin that the LED is attached to

// Variables will change:
int buttonPushCounter = 0; // counter for the number of button presses
int buttonState = 0; // current state of the button
int lastButtonState = 0; // previous state of the button

void setup() {
// initialize the button pin as a input:
pinMode(button, INPUT);
// initialize the LED as an output:
pinMode(rele, OUTPUT);
// initialize serial communication:
Serial.begin(9600);
}

void loop() {
// read the pushbutton input pin:
buttonState = digitalRead(button);

// compare the buttonState to its previous state
if (buttonState != lastButtonState) {
// if the state has changed, increment the counter
if (buttonState == HIGH) {
// if the current state is HIGH then the button
// wend from off to on:
buttonPushCounter++;
Serial.println("on");
Serial.print("number of button pushes: ");
Serial.println(buttonPushCounter);
}
else {
// if the current state is LOW then the button
// wend from on to off:
Serial.println("off");
}
}
// save the current state as the last state,
//for next time through the loop
lastButtonState = buttonState;

// turns on the LED every four button pushes by
// checking the modulo of the button push counter.
// the modulo function gives you the remainder of
// the division of two numbers:
if (buttonPushCounter % 2u == 0) {
digitalWrite(rele, HIGH);
} else {
digitalWrite(rele, LOW);
}

}

¿Pero esto es un menú en un LCD? Creo que no has entendido lo que busco.
De todas maneras gracias por molestarte en buscarme el código, así da gusto.
Muchas gracias solda86.

No es un menu en un LCD, pero es la forma de con un solo pulsador mediante el comando Switch case utilizar por ejemplo con el mismo pulsador q nos salgan 4 opciones distintas...no se si me explico, yo ahora estoy intentando hacer un menu si lo consigo te paso el codigo, con un poco de suerte en un par de dias ya q no dispongo de mucho tiempo para ello.

No sabes como te lo agradezco, muchísimas gracias un saludo!!