Um, so is the image flipped? This mounts upside down?
Wait, I think you need to swap the TX and RX pins. The TXO pin of the Arduino is connected to the TX pin of the OpenMV Cam. I think you want the TX pin ont he OpenMV Cam connected to the RXI pin on the Arduino.
Yes, the shield is back-to-back with the OpenMV, so you can get access to the Arduino reset button and the PWM pins. I think I’ve got the RX and TX pins right. I’ve labelled the OpenMV pins now so it should be easier to follow:
I would consider using I2C instead of UART. You have the A4 and A5 pins free on the Arduino, so you can make it into an I2C slave. This way you can connect more things to those two pins.
Here’s an example of a Pro Mini-based servo controller that uses I2C for communication: https://hackaday.io/project/9131-servo-controller (click on the ‘code repository’ to see the Arduino sketch used). I think you could easily modify this to suit your needs.
You’re probably right, but I’ve been traumatized by years of fighting I2C glitches and timing bugs in drones and I’ve got a bit of PTSD there (we now have a rule to only use SPI for mission critical stuff and we use Serial for everything else). At the end of the day, I always come back to Serial, which always works with every hardware combination I throw at it. It’s like English – not a great language, but ~everyone can speak it.
To be clear, I2C is very good for driving motors and servos. But I need this module to read sensors, too, and we’ve had trouble with I2C timing glitches introducing sampling biases in sensors. That’s why we won’t use it for any mission critical sensing.
I suppose you could use the same SPI bus as the wifi shield uses, and use one of the free pins as CS…
Slight update. I decided to move the Serial Rx and Tx pins on the Arduino that talk to the OpenMV to SoftwareSerial on Pins 2 and 3, so you can still use the hardware serial Rx and Tx pins for the FTDI cable to program it and monitor serial output while it’s attached to OpenMV:
Shame you didn’t move them to A4 and A5, then you would have the option for I²C
BTW, I tried both 3.3v and 5v Ardiuno Minis and they both worked fine (I guess the logic lines are tolerant of both). So might as well go with the 5v and get the faster clock speed
Good idea, I’m going to give that a try on my project.