Skip to content

Commit 9f3d99c

Browse files
authored
cam module example, use new img format and fix resolution
1 parent bc67453 commit 9f3d99c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/Berry.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2150,8 +2150,8 @@ cam_view.center()
21502150
i = img()
21512151
21522152
import cam
2153-
cam.setup(4) # 240 x 240
2154-
cam.get_image(i,i.RGB565)
2153+
cam.setup(5) # 240 x 240
2154+
cam.get_image(i,i.RGB565LE)
21552155
21562156
def lv_img_dsc(image)
21572157
var i = image.info()
@@ -2174,7 +2174,7 @@ descriptor = lv_img_dsc(i)
21742174
cam_view.set_src(descriptor) # bind cam_view to buffer of img
21752175
21762176
def video()
2177-
cam.get_image(i,i.RGB565) # this will just update the buffer, no reallocation
2177+
cam.get_image(i,i.RGB565LE) # this will just update the buffer, no reallocation
21782178
cam_view.invalidate()
21792179
tasmota.set_timer(20,/->video()) # aim for 50 Hz
21802180
end

0 commit comments

Comments
 (0)