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 d6a75d5 + 8cdb4df commit 7a9a1e2Copy full SHA for 7a9a1e2
CircuitPython_ESP32_Camera/esp32-s3-eye-lcdview/code.py
@@ -19,6 +19,9 @@
19
import board
20
import displayio
21
import esp32_camera
22
+import keypad
23
+
24
+button = keypad.Keys((board.BOOT,), value_when_pressed=False)
25
26
cam = esp32_camera.Camera(
27
data_pins=board.CAMERA_DATA,
@@ -43,6 +46,8 @@
43
46
display_bus.send(43, struct.pack(">hh", 0, 80+239))
44
47
t0 = adafruit_ticks.ticks_ms()
45
48
while True:
49
+ if (event := button.events.get()) and event.pressed:
50
+ cam.colorbar = not cam.colorbar
51
frame = cam.take(1)
52
if isinstance(frame, displayio.Bitmap):
53
display_bus.send(44, frame)
0 commit comments