OpenMarine
LCD Nokia 5110 - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: Pypilot (https://forum.openmarine.net/forumdisplay.php?fid=17)
+--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=18)
+--- Thread: LCD Nokia 5110 (/showthread.php?tid=1341)

Pages: 1 2


LCD Nokia 5110 - It Paradyske - 2018-07-25

Hi,

Does the LCD Nokia 5110 also work on openpilot?

Regards
Hans


RE: LCD Nokia 5110 - seandepagnier - 2018-07-25

do you mean openplotter? In that case, yes it can work, but by default the client isn't running.


RE: LCD Nokia 5110 - It Paradyske - 2018-07-31

What command do I have to use to start it? And are the buttons also enabled in that case?

regards
Hans


RE: LCD Nokia 5110 - seandepagnier - 2018-07-31

The lcd code is in pypilot/lcd. You can run it like "pypilot_lcdclient nokia5110" and the buttons (gpio) should be enabled. See the source code in pypilot/lcd/client.py for button pins.

For an IR remote to work, you need to have lircd running with your remote calibrated.


RE: LCD Nokia 5110 - It Paradyske - 2018-08-01

I think a file is missing:
lcdclient.conf

pi@openplotter:~ $ pypilot_lcdclient nokia5110
have gpio for raspberry pi
no lirc available
init...
using nokia5110
loading load config file: /home/pi/.pypilot/lcdclient.conf
failed to load config file: /home/pi/.pypilot/lcdclient.conf
Traceback (most recent call last):
File "/usr/local/bin/pypilot_lcdclient", line 11, in <module>
load_entry_point('pypilot==0.1', 'console_scripts', 'pypilot_lcdclient')()
File "/usr/local/lib/python2.7/dist-packages/pypilot-0.1-py2.7-linux-armv7l.egg/lcd/client.py", line 1224, in main
glutKeyboardFunc(lcdclient.glutkeydown)
File "/usr/lib/python2.7/dist-packages/OpenGL/GLUT/special.py", line 147, in __call__
contextdata.setValue( self.CONTEXT_DATA_KEY, cCallback )
File "/usr/lib/python2.7/dist-packages/OpenGL/contextdata.py", line 58, in setValue
context = getContext( context )
File "/usr/lib/python2.7/dist-packages/OpenGL/contextdata.py", line 41, in getContext
"""Attempt to retrieve context when no valid context"""
OpenGL.error.Error: Attempt to retrieve context when no valid context


RE: LCD Nokia 5110 - seandepagnier - 2018-08-02

the config file isn't critical.  It shouldn't be using opengl to run it on the lcd over spi.  Can you run the command using "sudo" ?


RE: LCD Nokia 5110 - It Paradyske - 2018-08-03

sudo gives the same result:
pi@openplotter:~/temppy/pypilot $ sudo pypilot_lcdclient nokia5110
importing glut
have gpio for raspberry pi
no lirc available
init...
using nokia5110
loading load config file: /root/.pypilot/lcdclient.conf
failed to load config file: /root/.pypilot/lcdclient.conf
Debug 7
Traceback (most recent call last):
File "/usr/local/bin/pypilot_lcdclient", line 11, in <module>
load_entry_point('pypilot==0.2', 'console_scripts', 'pypilot_lcdclient')()
File "/usr/local/lib/python2.7/dist-packages/pypilot-0.2-py2.7-linux-armv7l.egg/lcd/client.py", line 1225, in main
glutKeyboardFunc(lcdclient.glutkeydown)
File "/usr/lib/python2.7/dist-packages/OpenGL/GLUT/special.py", line 147, in __call__
contextdata.setValue( self.CONTEXT_DATA_KEY, cCallback )
File "/usr/lib/python2.7/dist-packages/OpenGL/contextdata.py", line 58, in setValue
context = getContext( context )
File "/usr/lib/python2.7/dist-packages/OpenGL/contextdata.py", line 41, in getContext
"""Attempt to retrieve context when no valid context"""
OpenGL.error.Error: Attempt to retrieve context when no valid context


RE: LCD Nokia 5110 - sapers - 2018-09-21

(2018-08-03, 06:12 AM)It Paradyske Wrote: sudo gives the same result:
pi@openplotter:~/temppy/pypilot $ sudo pypilot_lcdclient nokia5110
importing glut
have gpio for raspberry pi
no lirc available
init...
using nokia5110
loading load config file: /root/.pypilot/lcdclient.conf
failed to load config file: /root/.pypilot/lcdclient.conf
Debug 7
Traceback (most recent call last):
 File "/usr/local/bin/pypilot_lcdclient", line 11, in <module>
   load_entry_point('pypilot==0.2', 'console_scripts', 'pypilot_lcdclient')()
 File "/usr/local/lib/python2.7/dist-packages/pypilot-0.2-py2.7-linux-armv7l.egg/lcd/client.py", line 1225, in main
   glutKeyboardFunc(lcdclient.glutkeydown)
 File "/usr/lib/python2.7/dist-packages/OpenGL/GLUT/special.py", line 147, in __call__
   contextdata.setValue( self.CONTEXT_DATA_KEY, cCallback )
 File "/usr/lib/python2.7/dist-packages/OpenGL/contextdata.py", line 58, in setValue
   context = getContext( context )
 File "/usr/lib/python2.7/dist-packages/OpenGL/contextdata.py", line 41, in getContext
   """Attempt to retrieve context when no valid context"""
OpenGL.error.Error: Attempt to retrieve context when no valid context

I also see the same situation. So I need to repeat the question: how to start the LCD display Nokia5110 with openplotter/pypilot? I made wiring as here. Test program is working correctly, but openplotter doesn't start the display.
Please help.


RE: LCD Nokia 5110 - seandepagnier - 2018-09-21

try commenting line 1225 in client.py and any more lines in client.py that throw exceptions.

Not sure why this is triggered for you but it works for me.

I also use a different wiring from the link you posted. Check pypilot/lcd/ugfx/ugfx.cpp line 568. You can change these and recompile, but keep in mind I use the other io for button presses, so you would have to modify client.py as well to remap them. It would be easiest to just use DC on 25, and RST on 24. The rest of the connections are the same.

I think you only need to change DC to pin 25


RE: LCD Nokia 5110 - sapers - 2018-09-21

(2018-09-21, 04:30 PM)seandepagnier Wrote: try commenting line 1225 in client.py and any more lines in client.py that throw exceptions.

Not sure why this is triggered for you but it works for me.

I also use a different wiring from the link you posted.   Check pypilot/lcd/ugfx/ugfx.cpp  line 568.   You can change these and recompile, but keep in mind I use the other io for button presses, so you would have to modify client.py as well to remap them.   It would be easiest to just use DC on 25, and RST on 24.  The rest of the connections are the same.

I think  you only need to change DC to pin 25

and where I can to find this file? I can't to find it.