Jump to content
43oh

[Energia Library] LCD_screen Library Suite


Recommended Posts

  • 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

hi,

now i got a new problem.

what i want to do is switching between different "screens", which all show different measurement-data (as changing string). If i use only one "screen", there is no problem. But in the moment i draw a button (which should be used to switch "screen") the changing values can't be displayed correct (the value is only white pixel-bulk)

 

here you can see the value 2x (second character is changing in this moment) without button

post-46848-0-09656700-1441390259_thumb.png

 

here you can't see any value with button...

post-46848-0-60871600-1441390321_thumb.png

here is my code(the functionality of the button is not implemented yet, but this shouldn't be a problem...):

#include "Energia.h"
#include "SPI.h"
#include <LCD_graphics.h>
#include "LCD_GUI.h"

#define K35_SPI;
#include "Screen_K35_SPI.h"
Screen_K35_SPI myScreen;

// Define variables and constants
uint16_t value=0;
boolean increase=true;

uint16_t option=1;
// option 1 => Screen 1 
// option 2 => Screen 2
// option 3 => ...


//Define Buttons
button bRight;
//button bLeft;

void setup()
{
  Serial.begin(9600);
  Serial.println("begin... ");
  myScreen.begin();
  myScreen.setOrientation(1);
  myScreen.clear();
  //myScreen.dRectangle(myScreen.screenSizeX()-30, 0, 30, myScreen.screenSizeY(), myColours.red);
  bRight.dStringDefine(&myScreen, myScreen.screenSizeX()-30, 0, 20, 40, ">",   myColours.white, myColours.red);
  bRight.enable(true);
  bRight.draw(false);
}

void loop()
{
  switch(option){
  case 1:
    if(value==100){
      increase=false;
    }
    if(value==0){
      increase=true;
    }
    myScreen.setFontSize(myScreen.fontMax());
    myScreen.gText((myScreen.screenSizeX()-10*myScreen.fontSizeX())/2,
      (myScreen.screenSizeY()-myScreen.fontSizeY())/2, "   ", myColours.black);
    if(value<10){
      myScreen.gText((myScreen.screenSizeX()-10*myScreen.fontSizeX())/2,
      (myScreen.screenSizeY()-myScreen.fontSizeY())/2, "  " +
        String(value, DEC) , myColours.white);
    }               
    else if(value<99){
      myScreen.gText((myScreen.screenSizeX()-10*myScreen.fontSizeX())/2,
      (myScreen.screenSizeY()-myScreen.fontSizeY())/2, " " +
        String(value, DEC) , myColours.white);
    }
    else{
      myScreen.gText((myScreen.screenSizeX()-10*myScreen.fontSizeX())/2,
      (myScreen.screenSizeY()-myScreen.fontSizeY())/2,
      String(value, DEC) , myColours.white);
    }
    myScreen.gText((myScreen.screenSizeX()-2*myScreen.fontSizeX())/2,
    (myScreen.screenSizeY()-myScreen.fontSizeY())/2,
    "km/h" , myColours.white);
    if(increase){
      value++;
    }
    else{
      value--;
    }
    break;
  case 2:
    myScreen.gText((myScreen.screenSizeX()-10*myScreen.fontSizeX())/2,
    (myScreen.screenSizeY()-myScreen.fontSizeY())/2, 
    "Screen 2!" , myColours.white);
    break;
  }
}
Link to post
Share on other sites
Hi!
 
I'm testing a EducationalBP MKII (board revision 1.1) which I adquired with the MSP432 launchpad. When running the MSP432 binary examples build in Code Composer, the display and all other things works. When I go to Energia and run a example, the compiler returns error 2 in the EduBPMKII_Screen libraries, saying the board isn't compatible...
 
When I tried to test the Energia examples using my Tiva C launchpad, all worked, except that use the screen. All examples compiles, the RGB led, joystick and buzzer works, but the screen stay blank... Running the LCD_protocol100 example, it returns in serial monitor data about the display, but it still blank.
 
I tested the examples in Energia 12, 14 and 16.
 
That can be a problem in the libraries or in my boosterpack? There are some other tests can I do to solve the problem?

 

Thanks in advance!

Link to post
Share on other sites

The library was developed some time ago, when the MSP432 wasn't available.

 

The sketches check the MCU, and the __MSP432P401R__ isn't listed.

#if defined(__MSP430F5529__)
#define ROWS 32 // max 80
#define COLS 32 // max 60
#elif defined(__LM4F120H5QR__)
#define ROWS 64 // max 80
#define COLS 64 // max 60
#else
#error Board not supported
#endif

For the LM4F120 / TM4C123, same answers as said previously. R9 and R10 shunts pin 23 to 14 and 24 to 15.

Link to post
Share on other sites
  • 4 months later...
  • 2 months later...
  • 1 month later...

Hi All,

I am currently trying to get a Kentec K35 Display working on the MSP432 Launchpad. Is there an example Library available to get the basics running, and does R9 need to be removed? It was shipped to me with R10 removed and R9 in place. Any thoughts or help would be greatly appreciated.

Thanks

Tom

Link to post
Share on other sites
  • 1 month later...

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...