How do I send data to the camera over USB?

Hello, I have my OV7725 connected to a Raspberry Pi via USB, happily running a script stored in its internal memory as I can get the script’s print outputs on the RPi by opening a serial port to /dev/ttyACM0. However, how do I do the opposite, i.e., if the RPi sends something over this serial connection, how does the camera read it?

Have you tried this ?


import time, pyb
led = pyb.LED(3)
usb = pyb.USB_VCP()

while (True):
    line = usb.readline()
    if (line):

Note you can’t use this while the IDE is connected, and you need to set the baudrate to anything other than (921600 and 12000000). Since you’re on Linux you can use stty

stty -F /dev/ttyACM0 115200


Aha, no I had not. Tried it and it works, thanks a lot.