We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a4f5493 + 56bf5f6 commit bc31f2dCopy full SHA for bc31f2d
PiCowbell_Camera_Demos/TFT_Viewer/code.py
@@ -58,7 +58,12 @@
58
height = display.height
59
60
#cam.test_pattern = OV7670_TEST_PATTERN_COLOR_BAR_FADE
61
-bitmap = displayio.Bitmap(cam.width, cam.height, 65535)
+try:
62
+ bitmap = displayio.Bitmap(cam.width, cam.height, 65535)
63
+except MemoryError:
64
+ print("Oops, 240x240 is a little too big, trying 240x176..")
65
+ cam.size = adafruit_ov5640.OV5640_SIZE_QCIF
66
67
print(width, height, cam.width, cam.height)
68
if bitmap is None:
69
raise SystemExit("Could not allocate a bitmap")
0 commit comments