Community
cancel
Showing results for 
Search instead for 
Did you mean: 
BKish
Novice
1,432 Views

I2C LCD Runtime error

Jump to solution

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

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()

0 Kudos
1 Solution
idata
Community Manager
100 Views

Hi Bhanukishan,

 

 

Thank you for contacting us.

 

 

First of all, make sure that you are using the latest Edison Image version (201606081705), you can download it from here: https://software.intel.com/en-us/iot/hardware/edison/downloads.

 

 

Now, about your issue, it is weird because I tried your code (with some changes) and it worked without issues. First I tested the UPM example and it worked ( https://github.com/intel-iot-devkit/upm/blob/f8663c90f3474a97175cd4ffcb35b190438df39b/examples/pytho...). Then I did the same with your code, but I got some errors with the line "import pyupm_i2clcd as lcd" and I changed it for "from upm import pyupm_i2clcd as lcd" using the example gave before as reference, after I did this change it worked.

 

 

About the error message that you have, I get that error message when the LCD display is not connected, so please make sure that your LCD display is connected before running the code.

 

 

I hope you find this information useful.

 

 

Have a nice day.

 

 

Regards,

 

Leonardo R.

View solution in original post

9 Replies
idata
Community Manager
101 Views

Hi Bhanukishan,

 

 

Thank you for contacting us.

 

 

First of all, make sure that you are using the latest Edison Image version (201606081705), you can download it from here: https://software.intel.com/en-us/iot/hardware/edison/downloads.

 

 

Now, about your issue, it is weird because I tried your code (with some changes) and it worked without issues. First I tested the UPM example and it worked ( https://github.com/intel-iot-devkit/upm/blob/f8663c90f3474a97175cd4ffcb35b190438df39b/examples/pytho...). Then I did the same with your code, but I got some errors with the line "import pyupm_i2clcd as lcd" and I changed it for "from upm import pyupm_i2clcd as lcd" using the example gave before as reference, after I did this change it worked.

 

 

About the error message that you have, I get that error message when the LCD display is not connected, so please make sure that your LCD display is connected before running the code.

 

 

I hope you find this information useful.

 

 

Have a nice day.

 

 

Regards,

 

Leonardo R.

View solution in original post

idata
Community Manager
100 Views

Hi Bhanukishan,

 

 

That's great, thank you for letting us know that it worked.

 

 

And Joe, the version of the image that you downloaded is: 201606081705, you can check it with the command cat /etc/version.

 

 

Regards,

 

Leonardo R.
idata
Community Manager
100 Views

Thanks for an alternative approach to getting the version name people like to refer to here. I've reflashed my unit many times, so maybe I am mixed up, but I'm seeing:

root@edison:~# cat /etc/version

201606061707

root@edison:~# uname -a

Linux edison 3.10.98-poky-edison+ # 1 SMP PREEMPT Mon Jun 6 14:32:08 PDT 2016 i686 GNU/Linux

On my PC I do have Edison\Images\iot-devkit-prof-dev-image-edison-20160606-patch folder with the .bin files, I thought I last flashed that one. But if you're saying that image version should read 201606081705, then maybe I have installed the firmware from the Windows Edison Setup (file intel_edison_setup_win_v2016.2.007.exe) from https://software.intel.com/en-us/iot/hardware/edison/downloads Downloads for Intel® Edison Module | IoT | Intel® Software ? Would that explain it?

idata
Community Manager
100 Views

Hi Joe,

 

 

Yes, you are right. If you are using Intel Edison Board Configuration Tool (file intel_edison_setup_win_v2016.2.007.exe), when you are going to flash the firmware you can choose the option "Use existing image, located at:" and use iot-devkit-prof-dev-image-edison-20160606-patch, that should install the version 201606081705.

 

 

If you choose the option "Download and use the latest image", it will download the version 201606061707. Thank you for letting us know, I will inform this to the proper team.

 

 

Have a nice day.

 

 

Regards,

 

Leonardo R.
idata
Community Manager
100 Views

Last question about this, I promise

Do you have release notes from the latest build (iot-devkit-prof-dev-image-edison-20160606-patch / 201606081705)? What is the '-patch' that required the build 2 days later...thanks..

idata
Community Manager
100 Views

Hi Joe,

 

 

The release notes are the same: https://software.intel.com/en-us/blogs/2016/06/06/intel-iot-dev-kit-35-release-announcement, it is the same image (3.5) with some minor changes, that's why it has the same release notes.

 

 

Have a nice day.

 

 

Regards,

 

Leonardo R.
idata
Community Manager
100 Views

Thanks. Hopefully nobody is chasing issues down that happens on one of those builds but not the other - we wouldn't have any idea of what 'minor changes' were included I'm familiar with the SW release game, so I understand why this is the team's approach.

BKish
Novice
100 Views

Thanks Leonardo. It worked.

Reply