Expected unqualified-id before '{" token

/*
LiquidCrystal Library - Hello World

Demonstrates the use a 16x2 LCD display. The LiquidCrystal
library works with all LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you
can usually tell them by the 16-pin interface.

This sketch prints "Hello World!" to the LCD
and shows the time.

The circuit:
LCD RS pin to digital pin 7
LCD Enable pin to digital pin 8
LCD D4 pin to digital pin 9
LCD D5 pin to digital pin 10
LCD D6 pin to digital pin 11
LCD D7 pin to digital pin 12
LCD R/W pin to ground
LCD VSS pin to ground
LCD VCC pin to 5V
10K resistor:
ends to +5V and ground
wiper to LCD VO pin (pin 3)

Library originally added 18 Apr 2008
by David A. Mellis
library modified 5 Jul 2009
by Limor Fried (http://www.ladyada.net)
example added 9 Jul 2009
by Tom Igoe
modified 22 Nov 2010
by Tom Igoe

This example code is in the public domain.

http://www.arduino.cc/en/Tutorial/LiquidCrystal
*/

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

int receiver = 13; // Signal Pin of IR receiver to Arduino Digital Pin 11

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);

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!");
}
{
{
case 0xFF30CF: lcd.print("Hello!");
case 0xFF18E7: lcd.print("He2llo!");
}

type or paste code here

All sketches require a loop( ) function.

Every { needs a friend }

Welcome to the forum
If you edit your post with the :pencil2: down here :point_down:
You will be able to put it in code tags <|> and others will find it easier to help you.

I suspect the post above might be your answer however!

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project.

@pointersd1 your technique of printing someone else's code on a sheet of paper, putting that sheet through a document shredder, picking up some of the pieces and glueing them back together, then typing that back into the arduino IDE is not going to be successful!

1 Like

I don't know coding so good so that is my best option.

I was using the void setup loop for everything underneath it as shown below

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!");
}
{
{
case 0xFF30CF: lcd.print("Hello!");
case 0xFF18E7: lcd.print("He2llo!");
}
[/quote]

  • All sketches require a loop( ) function.

Did I understand you correct that you just get rid loop() procedure from your code?

I smell grief here. I presume the comment is stale, but pin 13 is the onboard LED for most Arduinos.

And yes, you need void loop(){}
without question.

Open a new sketch. What you see on the screen is the minimum you require. Now add stuff using the tutorials that come with the ide as examples. Go slow. Blinking LEDs is what you should focus on. LCD screens are a way off yet.

what is a an unqualified id?

Web tells me:

A qualified name is one that has some sort of indication of where it belongs, e.g. a class specification, namespace specification, etc. An unqualified name is one that isn't qualified .

In this case, the compiler sees an opening brace where there shouldn't be one. It would be better if it were preceded by a name because then it would start to look like you were trying to define a function. The compiler would still barf though.

Sometimes, the compiler gives succinct, obvious, clear error messages. But on other occasions, the best takeaway is "There's something wrong with your code in this area".

This seems to apply to your code: https://www.sololearn.com/Discuss/1964312/in-c-what-is-unqualified-id

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.