Hi,
I’m trying to get a Picture from the uCAM-II with my IOIO-OTG.
1/ PROBLEM 1
I think there is a mistake in the robotshop.com/media/files/pdf/datasheet-ucam-ii.pdf
at chapter 7.4.2 page 17
I read 7.4.2. Example: Picture (80 x 60 resolution, 12bit colour, uncompressed/RAW picture)
you say 12bit colour while in the Image format (page 8 of 22) there is no 12bit colour.
I think the INITIAL is wrong on page 17:
it should be for 8-bit GrayScale: INITIAL RAW, 80x60: AA 01 00 03 01 zz
or for 16-bit CrYCbY: INITIAL RAW, 80x60: AA 01 00 08 01 zz
or for 16-bit 565RGB: INITIAL RAW, 80x60: AA 01 00 06 01 zz
Question: I’m I right about the mistake or did I miss understand the document?
2/ PROBLEM 2
I connected my IOIO-OTG to the uCAM-II,
I do the SYNC series of command all is OK (I receive ACK and LAST SYNC),
I do SETBAUDRATE 115200(AA 07 1F 00 00 00) command is OK (I receive ACK)
I do INITIAL RAW, 80x60(AA 01 00 03 01 zz) command is OK(I receive ACK)
I do GET PICTURE(AA 04 02 00 00 00) I RECEIVE ACK
I Read DATA RAW picture AND compute data SIZE = 4800
Question 2.1: is 4800 what I should receive ?
I start Reading Image Data:
First trial: From my ioioUART inputstream i wait inUart.available() to be equal to 4800 but this never happens it hangs at 1024.
Second trial: I read 1024 then again 1024 then again 1024 then again 1024 then 704 to finish BUT the problem i a can read 1024+1024 but at the 3nd I wait inUart.available() but it is always 0.
Question 2.2: I’m I doing something wrong, what can be the problem ?
Thanks