6 Replies Latest reply on Mar 15, 2015 5:17 AM by rgb

    NodeJS, I2C LCD with Intel Galileo 2

    PunitG

      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:

       

      WP_20150312_17_37_02_Pro.jpg