i have a UNO minima and a Arduino NANO , i just want to be sure this connection if good between these two TX/RX Pins , can i go straight between or do i need a Bidirectional Level shifter. thank you
They both have 5V logic level, so you can connect directly.
Also, serial rx/tx are not bi-directional.
So im basically wanting to just send two Pieces of information of data to the NANO a Direction of 1 and an EnableMotor=1 the NANO has the Stepper Motor Code that Controls the motor with AccelStepper
can you give me a small example of sending the data over
Have a look at “serial basics” on this forum and there are examples in the IDE .
Note that on the Nano ( at least ) those Rx Tx lines are shared with the USB port .
It might be simpler to just use two digital outputs for your signals - one to show on/off , one for direction .
we should be able to use Software Serial Library on both Sides as well correct
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
void setup() {
Serial.begin(9600);
mySerial.begin(9600);
}
void loop() {
if (mySerial.available()) {
Serial.write(mySerial.read()); // Forward data from mySerial to Serial
}
if (Serial.available()) {
mySerial.write(Serial.read()); // Forward data from Serial to mySerial
}
}
Doesn't the Minima have a separate UART for its tx/rx (1,0) - no softwareserial req'd.?
ahh i do believe you are Correct
`The UNO R4 Minima board features two separate hardware serial ports.
One port is exposed via USB-C®, and
One is exposed via RX/TX pins.
This Goes to UART RX/TX
Serial.begin(9600);
Serial.print("hello world");
But im sure the Nano isn't that way
I believe it's Serial1 for the former.
Le Nano will 'require' softwareserial.
Serial is for data, and it seems a bit charitable to call the above that. You might be better off simply reading pins as Hammy suggests.
Another vote for plain digital outputs, if all you need is 2x 1/0.