From 780fdc5870688fc66b5a34ce69fd68575cae829a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BC=80=E6=99=BA?= Date: Sat, 30 Mar 2019 11:53:10 +0800 Subject: [PATCH] example for tv shield --- scripts/examples/31-TV-Shield/tv.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 scripts/examples/31-TV-Shield/tv.py diff --git a/scripts/examples/31-TV-Shield/tv.py b/scripts/examples/31-TV-Shield/tv.py new file mode 100644 index 000000000..cf6940c1f --- /dev/null +++ b/scripts/examples/31-TV-Shield/tv.py @@ -0,0 +1,15 @@ +# TV Example +# +# Note: To run this example you will need a wireless tv shield for your OpenMV Cam. +# +# The wireless video tv Shield allows you to view your OpenMV Cam's frame buffer on the go. + +import sensor, image, tv + +sensor.reset() # Initialize the camera sensor. +sensor.set_pixformat(sensor.RGB565) # or sensor.GRAYSCALE +sensor.set_framesize(sensor.QQVGA) +tv.init() # Initialize the tv. +tv.channel(8) # For wireless video transmitter shield +while(True): + tv.display(sensor.snapshot()) # Take a picture and display the image.