1#!/opt/bin/lv_micropython -i 2import lvgl as lv 3import display_driver 4import fs_driver 5from img_bulb_gif import img_bulb_gif_map 6 7fs_drv = lv.fs_drv_t() 8fs_driver.fs_register(fs_drv, 'S') 9# 10# Open a GIF image from a file and a variable 11# 12img_bulb_gif = lv.img_dsc_t( 13 { 14 "header": {"always_zero": 0, "w": 0, "h": 0, "cf": lv.img.CF.RAW}, 15 "data_size": 0, 16 "data": img_bulb_gif_map, 17 } 18) 19img1 = lv.gif(lv.scr_act()) 20img1.set_src(img_bulb_gif) 21img1.align(lv.ALIGN.RIGHT_MID, -150, 0) 22 23img2 = lv.gif(lv.scr_act()) 24# The File system is attached to letter 'S' 25 26img2.set_src("S:bulb.gif") 27img2.align(lv.ALIGN.RIGHT_MID, -250, 0) 28