After a while of playing:
or
Is the required code - depending which end you've plugged the lcd skin into.
Then using the terminal:
lcd.light(1) - and the backlight was on - and in business.
With a few modifications I got Conway's Life to work
>>> help (pyb.LCD)
object <class 'LCD'> is of type type
command -- <function>
contrast -- <function>
light -- <function>
write -- <function>
fill -- <function>
get -- <function>
pixel -- <function>
text -- <function>
show -- <function>
I tried a few commands:
Code: Select all
lcd = pyb.LCD("X") # Create an LCD object
lcd.light(1) # Turn on backlight (0 off)
lcd.fill(0) # clear display (1 fills to black)
lcd.pixel(x,y,1) # Set a pixel on (0 off)
lcd.text("Hello", x, y, n) # String at x,y - n 1 to write 0 to clear.
lcd.show() # Update display after drawing to it....
lcd.get(x,y) # read pixel at x,y (as displayed - so don't forget lcd.show() first if relies on current display
lcd.contrast(n) # Adjust contrast - haven't really needed this but display may vary
All worked - just remember to use show to update!
The interactive nature of the board is fantastic - just type to experiment!