I’m trying to get my openmv cam to output data directly into Blender through usb but I’m having some trouble actually getting information out. I have looked over the USB_VCP example in the IDE but still can’t seem to get anything readable out the other side. Right now I’m just trying to get the LED’s to light up when the cam is connected(I modified the LED example from the IDE). If I can get that done then I think I can figure out the rest on my own. When I open the serial port in Blender nothing lights up. Here is the code on the openmv cam. Any ideas what I’m doing wrong?
Side note: I was able to read data from an Arduino in Blender which makes me think I’m doing something wrong on the camera side.
import time, pyb from pyb import LED red_led = LED(1) green_led = LED(2) blue_led = LED(3) ir_led = LED(4) usb = pyb.USB_VCP() def led_control(x): if (x&1)==0: red_led.off() elif (x&1)==1: red_led.on() if (x&2)==0: green_led.off() elif (x&2)==2: green_led.on() if (x&4)==0: blue_led.off() elif (x&4)==4: blue_led.on() if (x&8)==0: ir_led.off() elif (x&8)==8: ir_led.on() while(True): if (usb.isconnected()): for i in range(16): led_control(i) time.sleep(500)