Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
1,741 Views

NodeJS, I2C LCD with Intel Galileo 2

I am trying to use Grove RGB LCD with Intel Galileo 2 (w/Yocto Linux - NodeJS) and have tried multiple frameworks but I am not able to make it work.

I've tried different ways to go about it. The color of the RGB LCD changes, but text does not get displayed.

Any help will be appreciated.

Code

Attempt # 1:

var Galileo = require("galileo-io");

var five = require("johnny-five");

var board = new five.Board({

io: new Galileo()

});

board.on("ready", function() {

console.log("connected>>>");

var lcd = new five.LCD({

controller: "JHD1313M1"

});

lcd.useChar("heart");

lcd.cursor(0, 0).print("hello :heart:");

console.log("hello>>>");

lcd.blink();

console.log("blink>>>");

lcd.cursor(1, 0).print("Blinking? ");

});

Attempt # 2:

var LCD = require('jsupm_i2clcd');

// Initialize Jhd1313m1 at 0x62 (RGB_ADDRESS) and 0x3E (LCD_ADDRESS)

var myLCD = new LCD.Jhd1313m1(0, 0x3E, 0x62);

console.log('LCD init!');

myLCD.setCursor(0,0);

myLCD.write("Hello world!");

myLCD.setCursor(1,0);

myLCD.write("Hello world!");

myLCD.close();

console.log('LCD done!');

Diagnosis done:

 

root@quark019eca:~# i2cdetect -l

i2c-0 i2c intel_qrk_gip_i2c I2C adapter

root@quark019eca:~# i2cdetect -y -r 0

0 1 2 3 4 5 6 7 8 9 a b c d e f

00: -- -- -- -- -- -- -- -- -- -- -- -- --

10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

20: -- -- -- -- -- UU UU UU -- -- -- -- -- -- -- --

30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

40: -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- --

50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- --

60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

70: -- -- -- -- -- -- -- --

Wiring:

0 Kudos
6 Replies
Highlighted
Valued Contributor I

Re: NodeJS, I2C LCD with Intel Galileo 2

Hi PunitG

I haven't tried to use the Grove RGB LCD with C or Node.js, but have with Python. (Go to end for info on Galileo Gen 2)

The RGB LCD uses SMBBus so doesn't show up with i2cdetect and I had to modify a Raspberry pi library to get it to show text.

If you look at the IoT XDK examples for the Grove RGB LCD using MRAA they include one at https://software.intel.com/en-us/node/541787 https://software.intel.com/en-us/node/541787

If you want to stick with Yocto, Seeed studio has a library for the Arduino, that you could look at to see if it works as it or needs modifying if it has anything specific to Atmega.

http://www.seeedstudio.com/wiki/Grove_-_LCD_RGB_Backlight http://www.seeedstudio.com/wiki/Grove_-_LCD_RGB_Backlight

or you could just use Python for your project and use what I posted.

Sorry if this isn't helpful, but best I can do right now

regards

rgb

0 Kudos
Highlighted
Novice

Re: NodeJS, I2C LCD with Intel Galileo 2

Hi rgb

I can try with JS libraries to achieve that.

What pins of GPIO should I use? As per the document provided by Intel http://download.intel.com/support/galileo/sb/galileoiomappingrev2.pdf http://download.intel.com/support/galileo/sb/galileoiomappingrev2.pdf GPIO60 does not exist.

0 Kudos
Highlighted
Valued Contributor I

Re: NodeJS, I2C LCD with Intel Galileo 2

Hi PunitG

The best source I found for Galileo Gen 2 pins is by EmuTex http://www.emutexlabs.com/project/203-getting-started-with-intel-galileo-gen-2 http://www.emutexlabs.com/project/203-getting-started-with-intel-galileo-gen-2, the one you referenced looks to be for the Galileo Gen 1

but since you can run i2cdetect and see the addresses used by the Galileo and change the colors, I am pretty sure your program and MRAA are setting the MUX correctly.

By Yocto, do you mean your are using the standard version, the version modified by AlexT or the IoT XDK version?

If you want to work with Node.js, I would strongly urge you to use the tools and distribution at https://software.intel.com/en-us/iot https://software.intel.com/en-us/iot

and then you can try the samples, such as the one for RGB LCD https://software.intel.com/en-us/node/541787 https://software.intel.com/en-us/node/541787

I only ran Node.js on a Galileo Gen 1, so can't say for sure if it works with the Galileo Gen 2. I can try to set up a Gen 2 board later next week, if you are still having problems

regards

rgb

0 Kudos
Highlighted
Valued Contributor I

Re: NodeJS, I2C LCD with Intel Galileo 2

Hi PunitG

I had some time today, so setup a Galileo Gen 2 with IoT XDK and ran RGB LCD example and now have Red Background with Hello world, so works

rgb

0 Kudos
Highlighted
Novice

Re: NodeJS, I2C LCD with Intel Galileo 2

Found out the issue.

The sensor requires 5v of supply. When providing 3.3v supply, only backlight will work. So essential to ensure 5v of supply either through Grove base shield power or some voltage step-up

Highlighted
Valued Contributor I

Re: NodeJS, I2C LCD with Intel Galileo 2

Hi PuntG

Good

I hadn't looked at IoT XDK in a while, so was surprised at all the new examples.

I plan on playing with Node.js this summer when have more time. Was put off as all the tutorials related to using it on Embedded systems are either very basic or really advanced. Almost nothing in the middle on using Node.js on boards without displays.

regards

rgb

0 Kudos