-
• #2
Are you using an up to date firmware?
Looks like there should really have been an error about I2C timeouts before the one about print - I was pretty sure that's something that got fixed recently.
However I reckon the issue is that the display isn't wired up right. Maybe SDA/SCL are crossed over, or maybe they don't have pullup resistors on them? I don't think those displays have them built in.
-
• #3
Do you get any errors if you leave off the lcd.print() command?
If so can you post that?
Also, do console.log(lcd) and see if there's anything there. I suspect the connectI2C() is encountering an error, resulting in there being no lcd object - so there's no print method.
-
• #4
Turns out that my board uses a different IO expander chip. I then used parallel interface and it worked fine. Sorry for the mix up.
I am curious how you change the I2c address without editing the module as it seems to be hard coded in?
-
• #5
Interesting - do you have a link to the module? This is the first time this has come up.
You'd have to change the module I'm afraid. To be honest a different IO expander IC might well behave in a different way (or be wired differently), so changing the address might not be enough.
If you want to play around with getting it working, try adding
exports={};
at the top of the RHS of the Web IDE, copy and paste in the existing module and dovar lcd = exports.connectI2C(I2C1);
at the bottom to test it.You could then play around with a different address/different commands to see if it works. We could then put the changes back in (either allowing the address to be changed, or it more was needed, having a separate function for your new driver IC).
-
• #6
Its the LCD backpack from adafruit.
I have a module in python that I wrote for it. Perhaps I can port it over.
-
• #7
Eep - yes, we should definitely support the Adafruit version. Actually it looks like this came up a few weeks ago, with *yet another IO chip in a module made by Adafruit!
http://forum.espruino.com/conversations/272048/
Adafruit has some Arduino code up for this one as well, at https://github.com/adafruit/LiquidCrystal
Looks like it'll have to be a new function, as the I2C commands are definitely different.
A
connectMCP23008
function should be pretty easy though.i2c.writeTo(0x20,9,data)
should handle the write once the IO direction is set.
I thought I would start playing with some modules today. The first one I tried was the HD44780 using the I2c example. When I try to run it I get this error.
This is the code...
This is the error returned.
Any suggestions?