Friday, November 07, 2014

System info on MOD-LCD3310 for Olimex A20SOM-EVB

To show the system information and other information on MOD-LCD3310, we can use python library. I found the implementation from this project and made a little modification to show ip address of wifi interface.

I also add one function to automatically cut the text and write it on the next line.
The function is longstr(linenumber,string). Example :
lcd.longstr(0,"Welcome to Open Hardware world!")
Using the modified python library, character can be showed in 16 x 6 dimension. How to do this?
  • Plug in the MOD-LCD3310 on UEXT2 port.
  • Install python library of the A20EVB.
# svn export https://github.com/OLIMEX/OLINUXINO/trunk/SOFTWARE/Python/
# cd pyA20EVB
# python setup.py install
or
  pip install pyA20EVB
  • Install required python library
pip install psutil netifaces
  • Download the files from git:
git clone https://github.com/arieedzig/py_LCD /opt/py_LCD
  • Create symbolic link or copy the init script from support directory:
cd /opt/py_LCD
cp support/lcdSysInfo /etc/init.d/
Enable the init script to run on startup:
update-rc.d lcdSysInfo defaults
Try to run the script manually, the system information will show up on the MOD-LCD3310 screen. Reboot to test whether it works correctly.

References:

https://github.com/HenningAust/py_LCD
https://www.olimex.com/forum/index.php?topic=2935.msg12302#msg12302


No comments: