Jump to content
43oh

[Energia Library] LCD_screen Library Suite


Recommended Posts

I think i have SPI 

 

Which protocol-example? protocol100 or protocol_Terminal?

 

if i choose protocol Termina and #define K35_SPI  i get this compilation-error:

 

In file included from /home/patrick/sketchbook/libraries/LCD_screen/Screen_ILI9340.cpp:22:0:
/home/patrick/sketchbook/libraries/LCD_screen/Screen_ILI9340.h:73:17: fatal error: spi.h: No such file or directory
 #include "spi.h"
                 ^
compilation terminated.

i don't understand why Screen_ILI9340.h is used... 

 

what am i doing wrong?

 

EDIT:

 

ok found a solution and was able to compile and upload:

 

i had to replace  #include "spi.h" with #include "SPI.h" or #include <SPI.h> in Screen_ILI9340.h, screen_ST7735.h and Template_screen_font.h then it worked...

 

 

 

what i now can see is a bright screen, is this what i should see?

 

and i have a terminal-output:

*** LCD_protocol
(All times in ms)
LCD_screen release	225
begin... done
Kentec 3.5" SPI screen
320x240
---
Points(128)	7573
feedArea	398
Ratio%	1902
fps(256^2)	-0.5
sp1000f(256^2)	1904.8
Square(200)	953
Square(100)	239
Square(50)	60
Font Number	4
Font Average	34
No storage
No storage
No storage
No storage
10xFontSolid(true)	4975
10xFontSolid(false)	4543
Ratio%	109
Original(=1)	136
point(readPixel())	Not readable
copyPaste()	Not readable
copyArea()+pasteArea() SD/SRAM	No storage
Touch	---

Edited by Rhab
Link to post
Share on other sites
  • Replies 94
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

As of October 2015 and due to intellectual property issues and licence infringements with users, the LCD_screen Library Suite is no longer available for download.   A special edition of the library is

Good news! The LCD_GUI library is available and brings the usual elements of a graphic interface as: label, button, dialog box, menu, slider and text box.     The project is based on a LaunchP

Give me some time to get some rest!   IMHO, implementing SD-card instead of SRAM shouldn't be difficult. You need to change 2 functions: void LCD_HY28A_SRAM::_fastCopyAreaToSRAM(uint16_t x0, uint1

Posted Images

Glad you've found a solution. So you're using the SPI version of the Kentec 3.5" screen.

 

By default, Energia seems to compile all the files in the folder of the library, hence the Screen_ILI9340.h.

 

The SPI.h capitalisation issues comes from older releases of Energia. Now SPI is always capitalised.

 

White screen... that's strange. Have you checked the jumpers on the BoosterPack are configured in 4-wire 8-bit SPI?

Link to post
Share on other sites

i am pretty sure that the boosterpack is connected well. i can read the x/y coordinates and print them to terminal:

while (counter)
        {
            if (myScreen.getTouch(x, y, z))
            {
                x = checkRange(x, 1, myScreen.screenSizeX()-2);
                y = checkRange(y, 1, myScreen.screenSizeY()-2);
                myScreen.dRectangle(x-1, y-1, 3, 3, myColours.yellow);
                Serial.print("x:\t");
                Serial.print(x, DEC);
                Serial.print(" /\t y:\t");
                Serial.println(y, DEC);
                counter--;
            }
        } 

how to check the jumpers?

Link to post
Share on other sites

Sorry but i don't find the catch.

 

I studied both pin-maps... seems to be allrigth... can't find any catch

I think i found a 0 ? jumper R9 (but as i told before, i am not good with hardware) but i don't know what this means, i think this should be ok because it is needed for 4-wire SPI, 8-bit rigth?

Do i Have to rename some PINS? I did not find the document where they are named... and i don't understand hint 4

 

sorry for beeing that incapable :(

Link to post
Share on other sites

Thanks.

If i want to use touch, option 2 is not possible, but i want to try if it works before "destroying" my hardware... but i don't now what to comment... the function void Screen_K35_SPI::_getRawTouch(uint16_t &x0, uint16_t &y0, uint16_t &z0) has no content i think...

Link to post
Share on other sites

this leads to compilation error:

LCD_protocol_Terminal_test.cpp:125:16: error: cannot declare variable 'myScreen' to be of abstract type 'Screen_K35_SPI'
 Screen_K35_SPI myScreen;
                ^
In file included from LCD_protocol_Terminal_test.cpp:124:0:
/home/patrick/sketchbook/libraries/LCD_screen/Screen_K35_SPI.h:76:7: note:   because the following virtual functions are pure within 'Screen_K35_SPI':
 class Screen_K35_SPI : public LCD_screen_font {
       ^
In file included from /home/patrick/sketchbook/libraries/LCD_screen/Screen_K35_SPI.h:62:0,
                 from LCD_protocol_Terminal_test.cpp:124:
/home/patrick/sketchbook/libraries/LCD_screen/LCD_screen_font.h:545:18: note: 	virtual void LCD_screen_font::_getRawTouch(uint16_t&, uint16_t&, uint16_t&)
     virtual void _getRawTouch(uint16_t &x0, uint16_t &y0, uint16_t &z0) =0; // compulsory
                  ^

comment virtual void LCD_screen_font::_getRawTouch(uint16_t&, uint16_t&, uint16_t&) leads to 

/home/patrick/sketchbook/libraries/LCD_screen/Screen_K35_SPI.cpp: In member function 'virtual void Screen_K35_SPI::begin()':
/home/patrick/sketchbook/libraries/LCD_screen/Screen_K35_SPI.cpp:292:28: error: '_getRawTouch' was not declared in this scope
     _getRawTouch(x0, y0, z0);
                            ^
/home/patrick/sketchbook/libraries/LCD_screen/Screen_K35_SPI.cpp: At global scope:
/home/patrick/sketchbook/libraries/LCD_screen/Screen_K35_SPI.cpp:519:75: error: no 'void Screen_K35_SPI::_getRawTouch(uint16_t&, uint16_t&, uint16_t&)' member function declared in class 'Screen_K35_SPI'
 void Screen_K35_SPI::_getRawTouch(uint16_t &x0, uint16_t &y0, uint16_t &z0)

and so on, thats why i tried another way... i changed "#define TOUCH_YP 24" to "#define TOUCH_YP 25" , compilation was no problem but i had again a white screen...

 

so i went through all the errors and commented every getRawTouch... and it seems to work, but now the screen is flickering in multi-coulours before beeing white again... is this what i should see?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...