I am trying to connect a Powerline module KQ330 with arduino uno as transmitter by connecting the Tx(1) pin of ardunio and the rx pin of KQ330 and then another KQ330 module and another ardunio uno as rxr. I am able to transmit the data from txr section but I am only abke to get output in the rxr section i.e. in the rxr side serial monitor only when i disconnect the connection from the transmit pin of the KQ330 module to rx(0) pin of ardunio.What should i do to get continous ouptut without removing the connection from RX pin of arduniop
I have moved your topic to a category suitable for the question....Wasn't a direct problem with Arduino IDE 1.x.
Welcome to the forum
You don't say which Arduino board you are using but for many of them it is not a good idea to use pins 0 and 1 unless you really know what you are doing and don't use the Serial monitor. This is because those pins are used by the Serial monitor interface
Arduino UNO
Then you would be well advised not to use pins 0 and 1
If you need a serial interface consider using SoftwareSerial on 2 other pins
I don't know aduino ide program I'm reffering the program which is available in arduino forum itself for both trasmitting and receiving. for transmitting it is working exactly but the reciever side it is like tx to tx only getting output it should be rx to tx no!!!!
The serial monitor also uses the TX and RX pins.
You cannot use the RX pin and the serial monitor at the same time.
You will have to use SoftwareSerial and connect to different pins on the receiver UNO
Which program are you referring to ?
What data are you hoping to transmit between the Unos ?
I tried to programme 10th pin to receive and 11th pin to transmit of the rxr arduino but the i got nothing in the serial monitor.Then I connected the TX (1) pin of arduino to the transmit pin of the KQ330 module instead of the digital pin 10 which i programmed to receive.
I am attaching code below:
#include <SoftwareSerial.h>
// Set up a new SoftwareSerial object
SoftwareSerial mySerial(10, 11); // RX, TX pin
void setup() {
pinMode(10, INPUT); // Set pin 10 as input
pinMode(11, OUTPUT);
// Set the baud rate for the SoftwareSerial object
mySerial.begin(9600);
}
void loop() {
if (mySerial.available()) {
String receivedMessage = mySerial.readString();
// Process the received message as needed
Serial.println("Message received: " + receivedMessage);
}
// Add any other code or functionality you need to run continuously
}
You can only do a read with sofware serial
char c = mySerial.read()
thank you it is working
Glad I could help
Have a nice day
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.