-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot write to second row of LCD screen #2
Comments
What about:
I'm not suggesting this as a solution, just identifying where the problem is ( |
Explicitly calling pifacecad_lcd_set_cursor does not seem to help. |
I just tried to write to the second line using the pifacecad command line util sudo /home/pi/pifacecad open blinkoff anyone has had success writing to the second line using the pifacecad util ? |
@MikePetullo Have you tried the
I'm not sure why |
I`ve also seen the ¥ glad this is consistent :-) thanks for checking |
@xpeace
|
Using dev_tp, the code in my initial comment now works. Running: ./pifacecad write "012345678901234 works too. Running: ./pifacecad write "0123456789012345 (one more digit on the first line) does not work. It seems that the '5' being printed in the final character cell causes the '\n' to be ignored. (Note that in the previous example, ending in '4', there is a blank cell remaining in the first line.) I also observed that in the latter case, pifacecad does not terminate---it just hangs after printing the first line. |
I also had problems when setcursor and other send_command functions are called (especially when using all 16 digits): try this on the dev_tp branch: // edit in pifacecad.c comment out busy check |
Does this fix this bug? |
I will check this in the next couple of days and report by replacing this temporary comment |
I am having the same issue. Trying to use the pifacecad command in BASH shell scripts, and I can only write to the first line. The "cursor" command does move the cursor around the display, but it seems the write command always starts writing text in the home position. As a workaround, I've added this little code snippet to the middle of pifacecad-cmd.c and recompiled:
|
Did the merge above not fix the issue? |
Hi Tom. After getting everything working in Raspian and OpenELEC, I found this that was still outstanding. It appears the problem is in pifacecad-cmd.c, as compiling your code from Dec 13, 2013 works fine, as does the test.c script, but running the following bash commands do not work correctly: ./pifacecad open After running the setcursor command, I see the cursor has jumped to the 5th column of the 2nd row, but the next write command starts back at the home position and overwrites part of the "Hello World". |
I finally got this to work with the pifacecad executable example. In src/pifacecad.c, I commented out line 129: // pifacecad_lcd_send_command(LCD_SETDDRAMADDR | cur_address); Now after a setcursor command, the next write statement does not start at the home position. |
The following code
int main(void)
{
pifacecad_open();
pifacecad_lcd_backlight_on();
pifacecad_lcd_write("Hello,\nWorld!");
pifacecad_close();
}
displays
Hello,
instead of
Hello,
world!
That is, I cannot get anything to appear on the second row of my LCD.
When I run libpiface's test.c, I only see:
but not the following line.
Oddly, running the hangman Python demo works (i.e., makes use of both rows), but C seems not to.
The text was updated successfully, but these errors were encountered: