ADC and DAC between two cams

Discussion related to "under the hood" OpenMV topics.
fsikkerm
Posts: 13
Joined: Wed Nov 21, 2018 5:21 pm

ADC and DAC between two cams

Postby fsikkerm » Mon Aug 10, 2020 10:08 am

Hi Guys,

I use two camera's to precisely measure the width of passing object. ( Camera are 170mm wide place and the object, a per sheet must 170mm+/- 1 )
sensor.set_framesize(sensor.FHD)
sensor.set_windowing((734,602,253,8))

Using Find line both camera's find the side of the object in the frame 256pixels width and 8 high
My idea is use DAC.WRITE for the 'Slave' cam to pass Line.X1 to the master using ADC.READ
Then calculate the wide..
But I wonder if this is the best approach?
Any help appreciated
User avatar
kwagyeman
Posts: 4458
Joined: Sun May 24, 2015 2:10 pm

Re: ADC and DAC between two cams

Postby kwagyeman » Mon Aug 10, 2020 11:26 am

This will be noisy. Just use the RPC library. See the remote control examples in the IDE.

Right now you need two I/O pins. One for RX and one for TX.

At some point I will update the RPC library to work over 1 half duplex RX/TX pin.

Anyway, look at the RPC examples for two OpenMV Cams sharing image data buffers.

What you want to do is for the master camera to put the slave one I into streaming mode and then have a callback that receives the length.

Finally, you can implement your current buisness logic in the loop_callback() handler of the RPC library.
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests