openmv serial communication with arduino not working properly

General discussion about topics related to OpenMV.
krishnakumar77777
Posts: 41
Joined: Mon Oct 15, 2018 6:34 am

openmv serial communication with arduino not working properly

Postby krishnakumar77777 » Fri Feb 01, 2019 9:23 pm

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?
krishnakumar77777
Posts: 41
Joined: Mon Oct 15, 2018 6:34 am

Re: openmv serial communication with arduino not working properly

Postby krishnakumar77777 » Fri Feb 01, 2019 10:36 pm

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
User avatar
kwagyeman
Posts: 3207
Joined: Sun May 24, 2015 2:10 pm

Re: openmv serial communication with arduino not working properly

Postby kwagyeman » Fri Feb 01, 2019 11:51 pm

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.
Nyamekye,
krishnakumar77777
Posts: 41
Joined: Mon Oct 15, 2018 6:34 am

Re: openmv serial communication with arduino not working properly

Postby krishnakumar77777 » Fri Feb 01, 2019 11:58 pm

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
User avatar
kwagyeman
Posts: 3207
Joined: Sun May 24, 2015 2:10 pm

Re: openmv serial communication with arduino not working properly

Postby kwagyeman » Sat Feb 02, 2019 2:18 am

Um, this should be fine. Your code could be doing anything so I can't tell what your problem is.
Nyamekye,
krishnakumar77777
Posts: 41
Joined: Mon Oct 15, 2018 6:34 am

Re: openmv serial communication with arduino not working properly

Postby krishnakumar77777 » Sat Feb 02, 2019 3:05 am

whether i need to connect any pullup or pulldown resistor to arduino mega?
User avatar
kwagyeman
Posts: 3207
Joined: Sun May 24, 2015 2:10 pm

Re: openmv serial communication with arduino not working properly

Postby kwagyeman » Sat Feb 02, 2019 2:39 pm

Not, these aren't strictly required. They help prevent random data when once device is off however.
Nyamekye,

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 7 guests