ST7565 LCD won't compile

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
nogginboink
 
Posts: 20
Joined: Sat Jul 30, 2011 4:32 pm

ST7565 LCD won't compile

Post by nogginboink »

I'm rather inexperienced with Arduino and I expect that I'm putting some files in the wrong place. I cloned the Git repo which has a file structure:

Code: Select all

ST7565-LCD
  c
    glcd.c
    glcd.h
    glcdfont.h
    Makefile
    stlcd.h
    util.c
    util.h
  ST7565
    examples
      gol
        gol.pde
      st7565lcd
        st7565lcd.pde
    glcdfont.c
    ST7565.cpp
    ST7565.h
When I put this folder in my sketchbook folder, I can open the Arduino IDE and go to File->Sketchbook->ST7565-LCD->ST7565 and can open either 'gol' or 'st7565lcd'

When I try to compile either of these sketches, I get the following errors:

Code: Select all

gol.pde:5:20: fatal error: ST7565.h: No such file or directory
compilation terminated.

st7565lcd.pde:1:20: fatal error: ST7565.h: No such file or directory
compilation terminated.
If, instead of putting the git repo clone into the sketchbook, I put it into the libraries folder inside the sketchbook folder, I get an error when I launch the Arduino IDE:

Code: Select all

Ignoring bad library name

The library "ST7565-LCD" cannot be used. Library names must contain only basic letters and numbers. (ASCII only and no spaces, and it cannot start with a number)
I can click OK on this dialog and now can go to File->sketchbook->libraries->ST7565-LCD->ST7565 and open either gol or st7565lcd, but I stil get the same errors when I try to compile.

I'm 98.2% certain that the problem is that I'm putting these files in the wrong place in my filesystem.

So, Adafruit community, where is the correct location to put these files? I'm using the Arduino IDE version 1:1.0.5+dfsg2-2 on Ubuntu Desktop 14.04 LTS 64 bit. I installed the Arduino IDE with apt-get and did not to any custom configuration. I might have had a version of avr-gcc installed before I installed the Arduino IDE; I'm not sure one way or the other.

nogginboink
 
Posts: 20
Joined: Sat Jul 30, 2011 4:32 pm

Re: ST7565 LCD won't compile

Post by nogginboink »

As always, posting a question online turns out to be the quickest path to solving it myself.

I put the ST7565-LCD folder in my sketchbook folder. I then took the ST7565 folder from inside there, and moved it to the libraries folder.

Now I can got to File->Examples->ST7565 and open either of the projects and compile. (Well, I got errors about read only variables not being declared const, but that was easily fixed.)

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: ST7565 LCD won't compile

Post by Franklin97355 »

Here is some reading for future library installs library install

nogginboink
 
Posts: 20
Joined: Sat Jul 30, 2011 4:32 pm

Re: ST7565 LCD won't compile

Post by nogginboink »

Thanks, Franklin. The hard part for me was understanding which files/folders were libraries and which weren't.

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: ST7565 LCD won't compile

Post by Franklin97355 »

It will get easier. Libraries usually have the same name as the .cpp and .h files inside and there will usually (but not always) be an example folder inside the library.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”