Communicating using UART

Hi all

I am trying to learn how to send some data from a camera module (OpenMV H7) to a particle photon board. I want send the data using UART but its something I am not familiar with. I am not sure how to write the code to receive data on the photon side. Any initial help and where I can look up to help me get started is much appreciated.

Thank you

Welcome to the community :+1:

However, have you at least had some cursory glance at the reference docs for UART (Serial1)?
https://docs.particle.io/reference/device-os/firmware/photon/#serial

There are bite size examples on how to use it and then you can have a forum search to build ontop of that.
Once you have invested some thought in the topic you can show what you tried and we can help expanding on that.

2 Likes

There is also a serial tutorial

2 Likes

Hi ScruffR

Thanks for providing me the link. Yes I have had look before. I found some example codes to communicate an arduino and particle. i tweaked the example codes to successfully implemented data transfer between an arduino and particle but when I replaced the arduino with the camera module it stopped working.

I felt that it was my lack of understanding on how to use UART and how the code works. So i thought id ask the community for some guidance where i can fill in my lack of knowledge on the matter.

Hi rickkas7

Thanks for sending me the link. This is quite useful. I will have a read through and might have more questions as I develop my code.

What code are you running on the camera?

AFAICT the OpenMV is a self-contained unit that features its own controller (STM32) which runs a custom program that can also communicate with the world around it via UART (amongst others).
Consequently that controller either needs to be told how its remote counterpart will talk to it or the counterpart needs to know how the OpenMV controller wants to be talked to and play by these rules.

Either way both sides need to be on the same page and hence we couldn’t advise what to do on the Particle side without also knowing what the OpenMV does.

Hi ScruffR

Thanks for that advice. That got me thinking and I found the issue. I thought by default URAT1 pin was transmitting the data. But it actually was URAT3. By swapping the pins I can read in the data sent from the module on the photon.

Thank you so much for all your help and taking the time to response to my post.

1 Like