Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Chris_S_Intel
Employee
1,964 Views

V3.0 Grove LCD Not Displaying Text (JHD1313M2)

Jump to solution

Developing basic "Hello World" example on Edison using JHD1313M2 Grove LCD and release 2.1 Yocto image. LCD backlight color updates with no issue, but text not displaying at all.

  • Eclipse and g++ compiles with no errors.
  • Tried on 3 different I2C ports using v2 base shield.
  • Verified LCD is connected to 5V.

Do I required update header file for JHD1313M2 or is JHD1313M1 adequate?

  • Jhd1313m1(int bus, int lcdAddress = 0x3E, int rgbAddress = 0x62);

 

Using the following header files from: C:\Intel\iotdk-ide-win\devkit-x86\sysroots\i586-poky-linux\usr\include\upm, file structure as follows:

  • grove.h, jhd1313m1.h, lcd.h, lcm1602.h, LCDTest.cpp
  • g++ LCDTest.cpp -o output.sh -lupm-i2clcd - lupm-grove -lmraa
  • ./output.sh

LCDTest.cpp code as follows:

# include "grove.h"

# include "jhd1313m1.h"

# include

# include

# include

# include

int main()

{

upm::Jhd1313m1* lcd = new upm::Jhd1313m1(0);

lcd->setColor(255, 0, 255); //WORKS

std::stringstream row_1;

row_1 << "Hello World";

lcd->setCursor(0,0);

lcd->write(row_1.str()); //DOESN't WORK

return MRAA_SUCCESS;}

Accepted Solutions
Pedro_M_Intel
Employee
64 Views

If you are still interested, you could try the following example code:

https://github.com/intel-iot-devkit/upm/blob/master/examples/c%2B%2B/jhd1313m1-lcd.cxx upm/jhd1313m1-lcd.cxx at master · intel-iot-devkit/upm · GitHub

You can compile the code above with the command:

g++ -o lcd lcd.cxx -I /usr/include/upm/ -lupm-i2clcd

Before doing so, you should install MRAA. In order to do so type the following:

echo "src mraa-upm http://iotdk.intel.com/repos/1.5/intelgalactic-dev http://iotdk.intel.com/repos/1.5/intelgalactic-dev" > /etc/opkg/mraa-upm.conf

opkg update

opkg install libmraa0

If you don't have any more repos configured do: opkg upgrade. Don't do this if you have AlexT's repo configured, if you do so, you'll be left out without any space in your board.

Peter.

View solution in original post

6 Replies
GFong
Novice
64 Views

FWIW, I am not also getting text to display on JHD1313M1 (the v2 version of the LCD). I'm using Johnny-five. I tried multiple variations of https://github.com/rwaldron/johnny-five/blob/master/eg/grove-lcd-i2c.js https://github.com/rwaldron/johnny-five/blob/master/eg/grove-lcd-i2c.js and just like above, I can change the background but I cannot display text. If you happened to resolve this issue, please post your solution. Otherwise, I'll wait for someone's response with bated breath.

EDIT: I forgot to mention my env.

I'm using an Edison on an Arduino BB w/ a Grove RGB LCD on a Grove base shield.

GFong
Novice
64 Views

Alright. I figured it out. Actually, someone else figured it out and I read their post online. The Arduino BB and Grove BS have to be set to 5v. I had the base shield at 3v. Once I flipped the switch, it worked. Hope that works for you flux2002.

Chris_S_Intel
Employee
64 Views

I did see similar article on voltage. This was one thing a triple checked with voltmeter before posting. Unfortunately even after ensuring 5V selected on BS and measuring 5V at LCD, still no text, only RGB backlight. I would like to know what was changed between v2.0 and v3.0 Grove LCD as wondering if any changes could cause this issue with posted code/addresses in original posting.

Pedro_M_Intel
Employee
65 Views

If you are still interested, you could try the following example code:

https://github.com/intel-iot-devkit/upm/blob/master/examples/c%2B%2B/jhd1313m1-lcd.cxx upm/jhd1313m1-lcd.cxx at master · intel-iot-devkit/upm · GitHub

You can compile the code above with the command:

g++ -o lcd lcd.cxx -I /usr/include/upm/ -lupm-i2clcd

Before doing so, you should install MRAA. In order to do so type the following:

echo "src mraa-upm http://iotdk.intel.com/repos/1.5/intelgalactic-dev http://iotdk.intel.com/repos/1.5/intelgalactic-dev" > /etc/opkg/mraa-upm.conf

opkg update

opkg install libmraa0

If you don't have any more repos configured do: opkg upgrade. Don't do this if you have AlexT's repo configured, if you do so, you'll be left out without any space in your board.

Peter.

View solution in original post

Chris_S_Intel
Employee
64 Views

Peter, this ultimately worked, thanks! I first ran opkg update with src mraa-upm. and ran sample program, but text still did not display. I then ran opkg upgrade and ran sample program, "Hello World" and text then displayed. I am using Intel's 2.1 Yocto image and Intel repos, but thank you for note on AlexT.

Pedro_M_Intel
Employee
64 Views

Great to hear that it worked . If you ever encounter any other issue, don't hesitate to come back to the community.

Peter.