Hi,
I have a problem with arduino nano. I would like to communicate with an arduino nano module 433 mhz but I can not make the port of communication open.
I always get that (! Serial.available ()).
I have to connect two modules via arduino nano 2 radio modules.
Arduino A ---> Radio A )))))))))))))(((((((((((((( Radio B <---Arduino B
the radio module is connected to gnd rx tx 3v3 with Arduino
I want to press a button on the Arduino to turn on an LED on Arduino and B
peppegti:
I have to connect two modules via arduino nano 2 radio modules.
Arduino A ---> Radio A )))))))))))))(((((((((((((( Radio B <---Arduino B
the radio module is connected to gnd rx tx 3v3 with Arduino
I want to press a button on the Arduino to turn on an LED on Arduino and B
First get your project working without the radio, just use wires between the arduins tx/rx/gnd pins. when that is working, then add the radios.
Below is some arduino to arduino test code that uses wire between the arduinos. If this works, then try the code with the radios instead of wires.
//zoomkat 3-5-12 simple delimited ',' string tx/rx
//from serial port input (via serial monitor)
//and print result out serial port
//Connect the sending arduino rx pin to the receiving arduino rx pin.
//Connect the arduino grounds together.
//What is sent to the tx arduino is received on the rx arduino.
//Open serial monitor on both arduinos to test
String readString;
void setup() {
Serial.begin(9600);
Serial.println("serial delimit test 1.0"); // so I can keep track of what is loaded
}
void loop() {
//expect a string like wer,qwe rty,123 456,hyre kjhg,
//or like hello world,who are you?,bye!,
if (Serial.available()) {
char c = Serial.read(); //gets one byte from serial buffer
if (c == ',') {
if (readString.length() >1) {
Serial.print(readString); //prints string to serial port out
Serial.println(','); //prints delimiting ","
//do stuff with the captured readString
readString=""; //clears variable for new input
}
}
else {
readString += c; //makes the string readString
}
}
}
Did you try connecting the two arduinos together just using some short wires instead of the radio modules? If so, what was received on the receiving arduino?