Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include itead_LiquidCrystal.h posts an error when compiling a program with it included #1

Open
lesterkell opened this issue Nov 2, 2014 · 0 comments

Comments

@lesterkell
Copy link

Hi, I'm trying to work a Liquid Crystal display using a Raspberry Pi B+ using the itead SDK but when I build the program in C and try to compile it, it posts an error

/usr/local/includeitead_LiquidCrystal.h:50:1: error: unknown type name 'class'
/usr/local/includeitead_LiquidCrystal.h:50:21: error: expected '=', ',', ';', 'asm' or 'attribute' before ':' token.

I only downloaded the new version last night from Git hub so I should be up todate. I am knew to raspberry Pi so please bare with me if i'm doing something silly. It does look like all include files that use the defenation 'class' will have the same error.

Any help would be great.

The code i'm using is:
//***********************************************************************************************
// include the library code:
#include <time.h>
#include <stdio.h>
#include <itead_LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(16,18,11,12,13,15);

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
}

main() {

time_t rawtime;
struct tm * timeinfo;

setup();
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):    
// lcd.setCursor(0, 0);

// print system time 
time ( &rawtime );
timeinfo = localtime ( &rawtime );
while(1)
    {  
    lcd.setCursor(0,0);
    lcd.print(asctime (timeinfo));
     delay(1000);
     }
}

//******************************************************************************************

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant