Display text when switches are toggled

Here i have a project i am under going, i am very new to Arduino code and arduinos in general.

i have 7 slide switches and i want each to display a different bit of text for example switch1 displays "Hello" and then clears once the switch is flicked back to normal.

and if switch 2 is flicked it will display a complete different message and so on.
Any help is appreciated.

Have you been able to use the LCD example code and print messages to the LCD?

hello, no i have not, ill have a look through it and then out up my code to see what could be changed.

I suggest you use the LCD example to get your LCD working as its wired into the circuit.

Then add in button press detection. Once you can display messages to the LCD and detect buttons then the next is to code for a detected button press to display a thingy.

Include IDE - file/examples/digital/statechangedetection in your reading.  You'll want to detect when a switch goes closed rather than when it is closed.

Hello
Post your sketch, well formated, with comments and in so called code tags "</>" to see how we can help.
Have a nice day and enjoy coding in C++.

the posted code does not show any slide switch detection code.

Please post your code using code tags. These are the </> in the tool bar above where you edit your post.

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

const int SwitchSlide1 =  13;
const int LCD = 7;

int switchState1 = 0;

void setup() {
  
  pinMode(LCD, OUTPUT); //initialize the led pin as output
  lcd.begin(16 ,2);
  

}

void loop(){

  //read the state of the switch value

  switchState1 = digitalRead(SwitchSlide1);

}
  if (switchState1 == HIGH}{
   
    lcd.clear();
    lcd.setCursor(0, 0)
    lcd.print("vmtA")
    
 {
   

Currently displaying an error

When did you initialize this pin for use in setup?

Is it a secret or do we play ask 10 million questions?

A few issues:

  1. Your code does not compile. Check your braces.
  2. You did not configure the pinMode for the switch in setup(). I would recommend configuring the internal pull-up so you do not need a resistor. This means that use should use GND when the switch is activated and therefore ON=LOW and OFF=HIGH
  3. Your switch wiring does not make sense. You realize the center terminal on the switch is common? The way you have it wired if you move the switch to the right you will short GND to 5V!!!
  4. You need to detect when the switch state changes and account for debounce. See the following tutorial: StateChangeDetection