26
26
default_bg = cwd + "/thingiverse_background.bmp" ,
27
27
text_font = cwd + "/fonts/Arial-12.bdf" ,
28
28
text_position = ((5 , 5 ), (5 , 200 )),
29
- text_color = (0x00FF00 , 0x00FF00 ))
29
+ text_color = (0x00FF00 , 0x00FF00 ),
30
+ text_transform = (None , None ))
30
31
pyportal .preload_font ()
31
32
32
33
while True :
36
37
print ("Response is" , response )
37
38
pyportal .set_background (None )
38
39
image_url = response [2 ].replace ('_thumb_medium.' , '_display_large.' )
39
- pyportal .wget (adafruit_pyportal . IMAGE_CONVERTER_SERVICE + image_url , " /cache.bmp" )
40
- pyportal .set_background ("/cache.bmp" )
40
+ pyportal .wget (pyportal . image_converter_url ( image_url , 320 , 240 ), "/sd /cache.bmp" )
41
+ pyportal .set_background ("/sd/ cache.bmp" )
41
42
42
43
except (IndexError , RuntimeError , ValueError ) as e :
43
44
print ("Some error occured, retrying! -" , e )
46
47
thingy = random .randint (0 , NUM_THINGS - 1 )
47
48
URL_LOCATION [0 ] = TITLE_LOCATION [0 ] = IMAGE_LOCATION [0 ] = thingy
48
49
49
- time .sleep (60 * 3 ) # cycle every 3 minutes
50
+ time .sleep (60 * 3 ) # cycle every 3 minutes
0 commit comments