-
• #2
Hi. I'll try this out next week. It's possible it is some issue with the minified module.
You could try editing the options in the Web IDE so that it loads unminified code first. Just change the order of
['min.js','.js']
... -
• #3
Hi Gordon,
I'm only using the unminifed code from your code example, does espruino minify it on the fly?
I tried putting all of the module code into the IDE, like this: http://pastebin.com/MatnNmhYERROR: Got ':' expected '(' at line 15 col 12 print : function(str) { ^ ERROR: Got function expected ':' at line 15 col 14 print : function(str) { ^ at line 15 col 21 print : function(str) { ^ in function "hd44780" called from line 1 col 26 ERROR: Using '.' operator on non-object at line 1 col 4 led.print("Hello World!"); ^ =undefined
It looks like a syntax error but there is nothing wrong with it? Any ideas what I should try next?
-
• #4
Argh. Yes, sorry - i bet it is a problem with recent Espruino versions (to do with the fact that print is a built in function). I'll look into this, but for now, if you put quotes around
print
(or rename it) I think it will work. -
• #5
Hi Gordon,
The new Espruino update has fixed the 'print()' bug but sadly it's still not working for me. I don't get any code errors the display just shows the first row fully blocked and nothing on the second row (see photo below). It is always like this from the moment I plug it in.
Have I wired something up incorrectly? Here are the pins I'm using:
var lcd = require("HD44780").connect(A8,A9,A10,A11,A0,A1);
Any ideas? Is this a code/hardware/wiring issue?
-
• #6
I reckon something's wrong with your wiring, because pin A11 isn't even on a pin header :) http://www.espruino.com/ReferenceESPRUINOBOARD
You should be able to use any pins though - although try not to use the 3 that are also used for the LEDs.
The block of pixels happens when the display powers on - so it could be anything (but at least you know the display is working).
I just tried again here, and it still works fine (and I tried on a few different sets of pins). I'll update the docs, but these are the connections/code I'm using:
// rs,en,d4,d5,d6,d7 var lcd = require("HD44780").connect(A0,A1,C0,C1,C2,C3); lcd.print("Hello World!");
LCD Function Espruino 1 GND GND 2 VCC Bat 3 Contrast GND (or variable resistor) 4 RS A0 5 RW GND 6 EN A1 7 D0 8 D1 9 D2 10 D3 11 D4 C0 12 D5 C1 13 D6 C2 14 D7 C3 15 LED + 16 LED - -
• #7
Yep my wiring was the problem. All working now, thanks. -
• #8
Great! :) What was it in the end? the RW line?
-
• #9
It was my mysterious A11 pin wiring, the C pins work perfect.
Hi guys,
I've got a HD44780 LCD character Display Module and I'm trying to get it working with Espruino. I've followed the guide here http://www.espruino.com/HD44780 and installed the HD33780 module, but whenever I run the code I get the following error:
Do you have any idea what's going wrong here? I've tried writing the module code directly but I get much the same results. What should I try next to fix this?
Thanks