chipKIT® Development Platform

Inspired by Arduino™

Problem with LCD16x2 by I2C module

Created Sat, 06 Apr 2013 13:31:54 +0000 by ermes


ermes

Sat, 06 Apr 2013 13:31:54 +0000

Hello everyone! I have a problem with chipKIT uc32.

With original Arduino Uno and Arduino 1.0.4 software I have connected the LCD16x2 (QC1602A v2 HD44780) by mjkdz I2C module (IIC/I2C/TWI/SP??I Serial Interface Board Module) at Arduino Uno (PIN 5V/GND/A4 SDA/A5 SCL). I used the LiquidCrystal_I2C.h library for Arduino 1.0, downloaded at following web site http://garagelab.com/profiles/blogs/tutorial-lcd-using-only-2-arduino-pins-with-pcf8574-and-i2c. I loaded the 'hello world' example and the display correctly works with I2C module.

I performed the same tasks using mpide program, the LiquidCrystal_I2C.h was loaded at mpide-0023/libraries and mpide-0023/hardware/pic32/libraries. By 'verify' button there were obtained the following results:

chipKIT uc32 board

In file included from HelloWorld.cpp:2:0: D:\Portable\PortableApps\mpide-0023.\hardware\pic32\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:82:18: error: conflicting return type specified for 'virtual size_t LiquidCrystal_I2C::write(uint8_t)' D:\Portable\PortableApps\mpide-0023\hardware\pic32\cores\pic32/Print.h:50:15: error: overriding 'virtual void Print::write(uint8_t)'

Arduino Uno board

In file included from HelloWorld.cpp:2: D:\Portable\PortableApps\mpide-0023.\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:82: error: conflicting return type specified for 'virtual size_t LiquidCrystal_I2C::write(uint8_t)' D:\Portable\PortableApps\mpide-0023\hardware\arduino\cores\arduino/Print.h:40: error: overriding 'virtual void Print::write(uint8_t)'

how can I get the chipKIT uc32 by LCD16X2 the I2C module?

Best regards


Jacob Christ

Sat, 06 Apr 2013 15:11:31 +0000

I can tell you why it does not work:

MPIDE being a fork of the Arduino IDE is not up to Arduino 1.0 capabilities yet. Some head way has been made but its slow going at the moment.

The library you are tying to use an alternative return type that the 0023 version of Arduino does not support.

So there are two ways to fix the problem.

  1. Look for an older (Arduino 0023) version of the library or modify the library so that it works with the older version.

  2. Assist in updating the MPIDE core so that it can utilize Arduino 1.0 libraries.

Jacob


ermes

Sun, 07 Apr 2013 12:20:19 +0000

hello If it is not difficult it would be interesting update that I can use the Arduino 1.0 libraries. thanks for the help


Jacob Christ

Sun, 07 Apr 2013 15:41:37 +0000

Here is a thread that has been started on updating the cores:

http://www.chipkit.org/forum/viewtopic.php?f=23&t=2309

Jacob


ermes

Tue, 16 Apr 2013 21:28:17 +0000

Hello, I downloaded the 1.5.2 beta version of Arduino and 0023 version of mpide. Now I don't understand how I can do mpide update with the new version of Arduino. Best regards.


majenko

Tue, 16 Apr 2013 21:40:30 +0000

If I understand what you're saying correctly, the answer is "you can't".

You have the Arduino 1.5.2. You have MPIDE 0023. The two are completely different things.

To use Arduino 1.0.0+ libraries on MPIDE the internals of the MPIDE PIC32 target needs re-writing to match the Arduino 1.0.0+ API. This is completely separate code to anything that is in the Arduino distribution (it was based on Arduino 0023, and heavily modified), as it is for a different micrcontroller.

Work is underway to update the MPIDE PIC32 target to match the API of Arduino 1.0.0+.

It's kind of like saying you have a top of the range PC, and an aged PowerMAC, and you want to use parts of the PC to upgrade the PowerMAC. Yes, the odd little bit may copy across, but the core of it is so different that it's just not possible.

Have patience ... we'll get there in time.