Dear All,
I send images on UART and it works fine.
Unfortunately, the receiver is busy and i need to send bytes slower.
Here is my code :
img=sensor.snapshot()
datasize = img.size()
sendsize = uart.write(img)
print(datasize, '=', sendsize)
I have any idea to get byte after byte from an image object.
Thanks for your help,
for i in range(img.size()):
print(img[i])
You could also try to increase the timeout_char:
http://docs.openmv.io/openmvcam/tutorial/uart_control.html?highlight=uart
Thanks for your answer.
I simplified the code to clarify my question but i use a compressed image.
To do like you said, i did :
img = bytearray(sensor.snapshot().compress)
datasize = img.size()
for i in range(datasize):
uart.writechar(img[i])
print(img[i])