This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LCD Nokia 5110
#1
Hi,

Does the LCD Nokia 5110 also work on openpilot?

Regards
Hans
  Reply
#2
do you mean openplotter? In that case, yes it can work, but by default the client isn't running.
  Reply
#3
What command do I have to use to start it? And are the buttons also enabled in that case?

regards
Hans
  Reply
#4
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.
  Reply
#5
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
  Reply
#6
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" ?
  Reply
#7
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
  Reply
#8
(08-03-2018, 01: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.
  Reply
#9
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
  Reply
#10
(09-21-2018, 11:30 AM)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.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)