Hi all,
I'm a beginner with Arduino and programming.
I have a problem. I want to use a LCD dispay (LCD Keypad Shield for Arduino).
I wrote a program in Arduino enviroment:
/*
Keypad Shield 1602 LCD
The circuit:
* LCD RS pin to digital pin 8
* LCD Enable pin to digital pin 9
* LCD D4 pin to digital pin 4
* LCD D5 pin to digital pin 5
* LCD D6 pin to digital pin 6
* LCD D7 pin to digital pin 7
* LCD BL pin to digital pin 10
*/
#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 13, 9, 4, 5, 6, 7);
void setup()
{
lcd.clear();
lcd.begin(16, 2);
lcd.setCursor(0,0);
lcd.print("Hello world");
}
void loop()
{
}
It works.
And now I have tried to do the same at the Atmel Studio, I have added a library for LCD dispaly (LiquidCrystal.h) at AVR/GNU C compiler
and at AVR/GNU C++ compiler.
I have set Atmel Studio by those videos: Tutorial Arduino + Atmel Studio 6 (Parte 1) - YouTube and Tutorial Arduino + Atmel Studio 6 (Parte 2) - YouTube
Here is my code:
#define F_CPU 16000000
#define ARDUINO 101
#include "Arduino.h"
#include "LiquidCrystal.h"
LiquidCrystal lcd(8, 13, 9, 4, 5, 6, 7);
void setup()
{
LiquidCrystal; // here is probably a mistake
lcd.clear();
lcd.begin(16, 2);
lcd.setCursor(0,0);
lcd.print("Hello world");
lcd.setCursor(0,1);
lcd.print("Welcome");
}
void loop()
{
}
When I build this code, Atmel Studio write me:
Error 1 expected unqualified-id before '.' token
I think a problem is in void setup() part, I don't know what I have to do for correct function of this code.
At he attachment you find my project (1602LCD.rar).
Please, could you help me?
Thank you.
1602LCD.rar (14.2 KB)