I have a simple script running
# connection handler camera receiving commands from computer
import io
import rpc
import struct
import sys
import utime
import pyb
blue = pyb.LED(3) # blue led
# The RPC library above is installed on your OpenMV Cam and provides mutliple classes for
##############################################################
# Call Backs
##############################################################
def hello_world(data):
# current_time = "HH:MM:SS"
# return struct.pack('%s', current_time)
blue.on() # blue + green make a turqoise
# return(struct.pack('s', b'hello'))
return(struct.pack('6s', ('hello', 'utf-8')))
##############################################################
# Main
##############################################################
green = pyb.LED(2)
green.on()
interface = rpc.rpc_usb_vcp_slave()
# interface = rpc.rpc_uart_slave(baudrate=115200)
interface.register_callback(hello_world)
interface.loop()
whenever I want to change the code, I launch the IDE, try to connect (bottom corner click on usb) and then run tools/save as main. Then the IDE hangs and the camera flashes white LED. I must unbrick the camera after this and delete file system. THIS HAPPENS EVERY TIME.
is there a way to avoid this? Is there a way to write directly to the camera’s main (currently when the camera is mounted it is mounted as read only file system’(
am running the ubuntu version of the IDE version 2.6.8
I should clarify, I use the IDE to save the script as main and disconnect the IDE to run the camera headless. Do some rpc work, change to code, crash. Thanks!!!