Hi,
Tnx for the quick response. Pardon the almost empty prior response; I use the TAB key at the beginning of a paragraph without thinking.
I must be doing something wrong and I don't understand CPP very well. In my previous attempts, the constructor I used had a variable list which ended
with the variables, _column and _row. When I 'updated the library, it now expects a variable which is the LCDType. My listing is below:
#include "mbed.h"
#include "TextLCD.h"
TextLCD lcd(p24, p25, p26, p27, p28, p29, p30, TextLCD::LCD20x4); // rs, rw, e, d0, d1, d2, d3
const char *message = "Hello there!";
int main() {
int i = 0;
while (1) {
i += 1;
i %= 4;
lcd.cls();
lcd.locate(0,i);
lcd.printf(message);
lcd.putc(' ');
lcd.putc ('0' + i);
wait_ms(500);
}
}
I now get a compile time error in line 6. I obviously do not know how to enter the LCDType in the variable list.
Jim
I've been using TextLCD with a Lumex 20x4 (Lumex part number S02004) module. The locate() function does not work correctly for lines 3 and 4 of this display. In particlar, locate(0,3) should go to the begoinning of the fourth line but instead goes to the same position as locate(0,0). locate(0,2) goes to about postion 16 on line 2; it should, of course, go to the beginning of the third line.