diff --git a/scripts/examples/08-RPC-Library/34-Remote-Control/image_transfer_jpg_as_the_remote_device_for_your_computer.py b/scripts/examples/08-RPC-Library/34-Remote-Control/image_transfer_jpg_as_the_remote_device_for_your_computer.py deleted file mode 100644 index 594030ada..000000000 --- a/scripts/examples/08-RPC-Library/34-Remote-Control/image_transfer_jpg_as_the_remote_device_for_your_computer.py +++ /dev/null @@ -1,92 +0,0 @@ -# This work is licensed under the MIT license. -# Copyright (c) 2013-2023 OpenMV LLC. All rights reserved. -# https://github.com/openmv/openmv/blob/master/LICENSE -# -# Image Transfer - As The Remote Device -# -# This script is meant to talk to the "image_transfer_jpg_as_the_controller_device.py" on your computer. -# -# This script shows off how to transfer the frame buffer to your computer as a jpeg image. - -import rpc -import sensor -import struct - -sensor.reset() -sensor.set_pixformat(sensor.RGB565) -sensor.set_framesize(sensor.QVGA) -sensor.skip_frames(time=2000) - -# The RPC library above is installed on your OpenMV Cam and provides multiple classes for -# allowing your OpenMV Cam to be controlled over USB or LAN/WLAN. - -################################################################ -# Choose the interface you wish to control your OpenMV Cam over. -################################################################ - -# Uncomment the below line to setup your OpenMV Cam for control over a USB VCP. -# -interface = rpc.rpc_usb_vcp_slave() - -# Uncomment the below line to setup your OpenMV Cam for control over the lan. -# import network -# -# network_if = network.LAN() -# network_if.active(True) -# network_if.ifconfig('dhcp') -# -# interface = rpc.rpc_network_slave(network_if) - -# Uncomment the below line to setup your OpenMV Cam for control over the wlan. -# -# import network -# network_if = network.WLAN(network.STA_IF) -# network_if.active(True) -# network_if.connect('your-ssid', 'your-password') -# -# interface = rpc.rpc_network_slave(network_if) - -################################################################ -# Call Backs -################################################################ - - -# When called sets the pixformat and framesize, takes a snapshot -# and then returns the frame buffer jpg size to store the image in. -# -# data is a pixformat string and framesize string. -def jpeg_image_snapshot(data): - pixformat, framesize = bytes(data).decode().split(",") - sensor.set_pixformat(eval(pixformat)) - sensor.set_framesize(eval(framesize)) - img = sensor.snapshot() - img.to_jpeg(quality=90) - return struct.pack("