Welcome to Synthiam!

Program robots using technologies created from industry experts. EZ-Builder is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.
Get Started

Asked — Edited
Resolved Resolved by Steve1DH!

V4 Two Way Serial Communication - Where Do I Connect To Read?

Hi all,

I'm trying to get serial feedback from a device. Does anyone know where on the V4 I should attach to read back serial information from device? I know I send a serial command to through one of V4's digital signal pins but where do I read it back from?

I thought it would be read from the same digital pin I sent the command. However @Toymaker made a comment in another thread that it may have to be read through one of the i2c ports.

Any insight is welcomed. :)

sounds like the ezb is writing to itself. check the wiring...

- EZB UART 1 TX connected to ARDUINO RX
- EZB UART 1 RX connected to ARDUINO TX
I triple Check that part. Tomorrow thursday il be able to work on It but only remotely. I'll check again just to make sure.

There's a loop back happening somewhere indeed.

But, really, thank you so much. I knew all the operations and functions but really I'm not yet trained enough to think of them when I'd need them, although I started thinking of serial write right before I read ur advice in that matter which is a start of a beginning of understanding. Let's stay positive! Haha.

Yeah - it must be a wiring issue.

The Arduino and EZ-Builder code are both solid. The arduino loops for ever until it receives the command 'a' from ez-builder. Once it receives the command, it transmits the A and B trigger values and resets the counter.

It's an incredibly simple process - so the wiring will be the focus.

Resetting the counter after each query is the right way to monitor encoders. This is because it allows you to see which wheel is rotating quicker/slower since the last query. And if your sample time is ever 1,000 ms, then you can correct the speed with pwm.

If you wish to know the distance traveled, simply keep a running total in EZ-Builder of both encoder values.
Arduino has a separate power source. Maybe I should give both (EZB and Arduino) a common ground?
Oh most definitely yes and yes! Always always common ground:). Apologies for not mentioning that before as I assumed they were the same power source.

Always need a common ground. First rule!:)
that was the issue. Needed a common ground...:) It seems to work now.

thanks a lot Dj!

Now, it took me so long to figure this out thanks to your help that this thread should be referred as a great tutorial for future users who would wish to establish similar com.