Error in UART communication between Uno & Nano


#1

Hello! I made a project, but Uno’s pins have ended. I wanted to add a Nano and make it communicate with each other via UART, but unsuccessfully. What is wrong?
Codes are here.
receive.xodball (3.1 KB)
transmitt.xodball (4.8 KB)


#2

For a start, you haven’t called “begin” on the UART at boot. This gets the ball rolling.


#3

Do i need to begin it on both Arduinos?


#4

So?
receive.xodball (3.5 KB)
transmitt.xodball (4.2 KB)


#5

Look at this, @nkrkv is about to write a guide on this. Maybe you can help each other.


#6

Yes. It sets the baud rate for communication. Serial comms won’t work without that being correct.


#7

Can i use I2C if i couldn’t make a connections?


#8

UART guide article is coming next week. The author is not me, but nevertheless, it will shine the light on serial communication I hope.


#9

Why don’t you make a simple transmitter using the arduino IDE, from an example or similar. Something you know works.? Then use XOD to make a simple patch that listens for received bytes. This would be to establish you can make at least a connection (You may have a damaged board or something).

One thing I noticed when I was playing around with the uart library is that in the soft-uart patch code, when the SoftwareUart class is instantiated, the call to the software serial has the tx and rx parameters reversed. It should be _serial(tx, rx).


#10

I have noticed, that my board have a problem reading ds18b20…
About Arduino IDE, I just wanted to do it in XOD, but I will try.

How about I2C? Is it only for sensors or displays, ets? Can I do a “phone” for arduino using it?


#11

I’m only suggesting the Arduino IDE as part of the problem-solving process. At this stage, you don’t know if your client code, your server code, the XOD IDE code, or the hardware itself which is the issue. So best to eliminate as many variables as you can.

I haven’t used I2C for comm devices, so can’t help there. I’m currently using an HC-12 with the UART library.


#12

I am testing now with Ide and i understood that i did not connected grounds together…
I am idiot


#13

All work with softwareserial library
will try in xod with ground:)


#14

I can’t do it… :frowning:
receiving Arduino just don’t switch 13 led off from starting…
but also i will try I2C


#15

Mistakes are how you learn. The more mistakes the more you learn.


#16

i have tried in XOD, but unsuccessful…


#17

What is the arduino code and what is the XOD patch you tried?


#18

Hi @nkrkv,
any news on the UART guide?

Best
Tobias


#19

Ah, sorry, it is late because we were too busy preparing the new release. We’ll return to the guide in the nearest days. @gabbapeople already have a working prototype and an almost ready article content.


#20

@nkrkv working prototype? Sounds good :slight_smile: