Page 1 of 1

openmv serial communication with arduino not working properly

Posted: Fri Feb 01, 2019 9:23 pm
by krishnakumar77777
hi,
i am sending the blob's x and y to arduino mega using the uart 3...The data is correctly sended to arduino mega as i checked this through computer's serial port after connecting arduino tx and rx with openmv's p4 and p5...i have tried this using a simple code...for our project we need to send the data and inform the location of blobs to arduino and move the camera to location using stepper motors in x,y directions...at this time when i connected the arduino with motor control code and disconnecting the arduino from computer,the motor is getting struct or arduino mega is getting interuppted i think so...and if i comment the line which makes the uart communication established in openmv, the motor runs smoothly..where will be the problem?

Re: openmv serial communication with arduino not working properly

Posted: Fri Feb 01, 2019 10:36 pm
by krishnakumar77777
i am using P1 and P2 for other usage. cant i use those pins out of uart for other usages?
i have seen this now and asking it... https://docs.openmv.io/library/pyb.UART ... ow-control

Re: openmv serial communication with arduino not working properly

Posted: Fri Feb 01, 2019 11:51 pm
by kwagyeman
Please use P4 a and P5. These are the pins everyone uses. The other part pins are technically supported in hardware but you need to use a different usrt bus that bus 3.

Re: openmv serial communication with arduino not working properly

Posted: Fri Feb 01, 2019 11:58 pm
by krishnakumar77777
hi,
I am using the uart 3 bus and pins p4 and p5. im using P1 and P2 as GPIO/pyb pins for making output and input digital high/low. will this cause problem with arduino. My arduino runs the motor as slowed down when im running the openmv script and when i commented the declaration of bus 3 uart,the motor runs normally.
thank you

Re: openmv serial communication with arduino not working properly

Posted: Sat Feb 02, 2019 2:18 am
by kwagyeman
Um, this should be fine. Your code could be doing anything so I can't tell what your problem is.

Re: openmv serial communication with arduino not working properly

Posted: Sat Feb 02, 2019 3:05 am
by krishnakumar77777
whether i need to connect any pullup or pulldown resistor to arduino mega?

Re: openmv serial communication with arduino not working properly

Posted: Sat Feb 02, 2019 2:39 pm
by kwagyeman
Not, these aren't strictly required. They help prevent random data when once device is off however.