I have a problem, I tried several solution without success!
I already read on the forum solutions but impossible to display my image..
instead of my image I have this:
or http://gofile.me/3qDFk/bhSbfcOc1
my code:
Code: Select all
import lcd160cr
import pyb
lcd = lcd160cr.LCD160CR('X')
pyb.delay(5000)
lcd.erase()
lcd.set_orient(lcd160cr.LANDSCAPE)
lcd.rect(0,0,160,125)
lcd.set_text_color(lcd.rgb(255, 0, 0), lcd.rgb(0, 0, 0))
lcd.set_font(2, scale=0)
lcd.set_pos(25, 60)
lcd.write("Hello les amis")
pyb.delay(2000)
lcd.erase()
#image = bytearray(1000)
with open('/sd/pics/image.jpg', 'r') as f:
image = f.read()
lcd.set_pos(0,0)
lcd.jpeg(image)
Seb