Activating the LCD160 on top of the pyboard 1.1

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Ruedi
Posts: 10
Joined: Tue Feb 21, 2017 2:34 pm

Activating the LCD160 on top of the pyboard 1.1

Postby Ruedi » Tue Feb 21, 2017 4:15 pm

Hi there,
I'm pretty new with MicroPython and the Pyboard v1.1 and therefore still a bit unsafe.
I activated the board successful and then I tried to activate the LCD160CR. Unsuccessful. This is what I did:

Following the tutorial on micropython.org https://micropython-pfalcon.readthedocs ... _skin.html
I tried to activate

5. The LCD160CR skin

First I updated firmware successful with pybv11-20170219-v1.8.7-292-g3d739eb.dfu which was announced to be the newest on GitHub, using STs DfuSe_Demo_V3.0.5_Setup.exe. Then I continued using the Putty-console, following the tutorial

5.3. Testing the display

>>> import lcd160cr
>>> import lcd160cr_test
To run all tests: test_all(<lcd>)
Individual tests are: test_features, test_mandel
<lcd> argument should be a connection, eg "X", or an LCD160CR object
>>> test_all('Y')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'test_all' is not defined
>>>

I tried both positions X and Y, then I tried to awake the display again following the tutorial

5.6. Directing the MicroPython output to the display

>>> import pyb
>>> uart=pyb.UART('XA',115200)
>>> pyb.repl_uart(uart)

The result can be called no result, display shows no sign of life. Please help! What's wrong? What am I doing wrong?

tine3700
Posts: 6
Joined: Tue Sep 13, 2016 7:08 am

Re: Activating the LCD160 on top of the pyboard 1.1

Postby tine3700 » Tue Feb 21, 2017 6:57 pm

Please try:

>>> import lcd160cr
>>> import lcd160cr_test
>>> lcd160cr_test.test_all('X')
for the X-Position or
>>> lcd160cr_test.test_all('Y')
for the Y-Position

Ruedi
Posts: 10
Joined: Tue Feb 21, 2017 2:34 pm

Re: Activating the LCD160 on top of the pyboard 1.1

Postby Ruedi » Wed Feb 22, 2017 11:12 am

This was the crucial advice, thank you tine3700

Ruedi
Posts: 10
Joined: Tue Feb 21, 2017 2:34 pm

Re: Activating the LCD160 on top of the pyboard 1.1

Postby Ruedi » Thu Feb 23, 2017 8:58 am

Hi there, can someone help me with this subject:

In order to realize my display projects I want to get rid of the initially shown MicroPython logo and the display info. Tried these two setup commands: LCD160CR.set_startup_deco(value) and LCD160CR.save_to_flash() with the parameters pointed out in "MicroPython Documentation, Release 1.8.7, sheet #114 without success.

Will be thankful for any advice how to manage it?

Ruedi

chuckbook
Posts: 18
Joined: Fri Oct 30, 2015 11:55 pm

Re: Activating the LCD160 on top of the pyboard 1.1

Postby chuckbook » Thu Feb 23, 2017 11:10 am

Try:

Code: Select all

lcd.write(b'\x02fn')

instead of:

Code: Select all

lcd.save_to_flash()

Ruedi
Posts: 10
Joined: Tue Feb 21, 2017 2:34 pm

Re: Activating the LCD160 on top of the pyboard 1.1

Postby Ruedi » Thu Feb 23, 2017 11:58 am

Hi chuckbook, thanx for your advice, unfortunately not working.
This is the script I'm using it with:

>>>import lcd160cr
>>>lcd=lcd160cr.LCD160CR('X')
unwanted label and info are displayed
>>>lcd.write(b'\x02fn')
no change

Ruedi
Posts: 10
Joined: Tue Feb 21, 2017 2:34 pm

Re: Activating the LCD160 on top of the pyboard 1.1

Postby Ruedi » Thu Feb 23, 2017 2:04 pm

>>>lcd.erase() did the job

Was hidden under MicroPython Documentation, Release 1.8.7, sheet 115, "Drawing primitive shapes". Should better be situated under "Setup Commands", as I would propose.

SpotlightKid
Posts: 190
Joined: Wed Apr 08, 2015 5:19 am

Re: Activating the LCD160 on top of the pyboard 1.1

Postby SpotlightKid » Thu Feb 23, 2017 3:23 pm

Feel free to submit a documentation PR on github.

chuckbook
Posts: 18
Joined: Fri Oct 30, 2015 11:55 pm

Re: Activating the LCD160 on top of the pyboard 1.1

Postby chuckbook » Thu Feb 23, 2017 9:20 pm

You missed something:

Code: Select all

import lcd160cr
lcd=lcd160cr.LCD160CR('X')
lcd.set_startup_deco(0)         # this is important!!!
lcd.write(b'\x02fn')
lcd.set_power(0)
# wait a second...
lcd.set_power(1)


erase() just fills the screen with whatever color was selected by set_pen()

Ruedi
Posts: 10
Joined: Tue Feb 21, 2017 2:34 pm

Re: Activating the LCD160 on top of the pyboard 1.1

Postby Ruedi » Fri Feb 24, 2017 8:04 am

Thanks a lot from a beginner, chuckbook


Return to “The MicroPython pyboard”

Who is online

Users browsing this forum: No registered users and 2 guests