Open MV pan tilt project!

Hello all! I’m new to programming and the open MV in general! very cool platform though!
I wanted to get started by using the face detection example script and sending that X Y data of the box being drawn around a face to a simple Adafruit Mini Pan-Tilt Kit.
I have some experience with Arduino so I’m wondering if it would be easier to send the face detection data to Arduino over I2C or serial connection? I’m not very well versed in python so I don’t feel confident in doing a lot of the programming here? are there any resources anyone could point me to? I feel like this is a fairly simple starter project that maybe there is a tutorial or past project I could read up on that would help me effectively?
Thanks for you’re time!

1 Like

Hi, you can use our RPC library to send commands to the Arduino. We literally have an example for this in the IDE that should work out of the box.

Thank you for the reply! I found the RPC Arduino library in open mv IDE but I’m a bit confused about it all. I uncommented the interface = rpc.rpc_i2c_master(slave_addr=0x12, rate=100000) function but I don’t get an image and I don’t know how to physically connect the open mv board as a master device to the Arduino as a slave device so that I can get the face detection box X Y data into Arduino serial port. Perhaps you can explain this comment
( NOTE: Master and slave addresses must match. Connect master scl to slave scl and master sda to slave sda. You must use external pull ups. Finally, both devices must share a ground. )
I think my problem may be here?

If you want to use the Arduino serial port then you need to use the RPC library on the Arduino: GitHub - openmv/openmv-arduino-rpc: Remote Procedure/Python Call Library for Arduino

See here: openmv-arduino-rpc/popular_features_as_the_controller_device_example.ino at master · openmv/openmv-arduino-rpc · GitHub

Then run the same popular features on the OpenMV Cam. Then uncomment the serial port interfaces on each and it will work.

1 Like