9 Replies Latest reply on Mar 1, 2017 11:58 AM by joe_nasti

    I2C LCD Runtime error

    bhanukishan

      Currently I am using laterst image of Yocto (201606061707). Earlier I was able to use Grove RGB i2c lcd (Jhd1313m1) quite easily. After upgrading to the latest version, compiling  the same python throws a runtime error. Can you help me sort this issue out please?

       

      Here's the error,

      Traceback (most recent call last):

        File "LCD.py", line 5, in <module>

          myLcd = pyupm_i2clcd.Jhd1313m1(1,0x3E,0x62)

        File "/usr/lib/python2.7/site-packages/pyupm_i2clcd.py", line 560, in __init__

          this = _pyupm_i2clcd.new_Jhd1313m1(bus, lcdAddress, rgbAddress)

      RuntimeError: UPM Runtime Error: upm::Jhd1313m1::Jhd1313m1(int, int, int): Unable to initialise the LCD controller

       

      Here's the program

      #import essential libraries

      import pyupm_i2clcd as lcd

      import time

      #declare pins and initiate the device

      myLcd = lcd.Jhd1313m1(0,0x3E,0x62)

      myLcd.setCursor(0,0)

      #RGB red

      #myLcd.setColor(255,204,0)

      while True:

          for i in range(0,255,5):

              myLcd.setColor(i,i/5,i/15)

              myLcd.scroll(True)

              myLcd.write('Third One')

              myLcd.setCursor(1,0)

              myLcd.write('LCD On')

              time.sleep(1)

              myLcd.setCursor(1,0)

              myLcd.write('LCD Off')

              time.sleep(1)

              myLcd.clear()