Bro you don't know how many hours I'm attending to do this and it doesn't worked. With your video I fixed it and now I can send a huge json fron node mcu to arduino uno . Big thanks brother❤❤❤❤❤
Can I send more than one value from the sender to the receiver? Let's say I want the receiver to send the value of the water level and the temperature to the slave arduino so it can control the heating and motor. It would be simple for the master to just send a "confirmation text" using an if else statement and if the conditions match send a single value to "give order" to the slave arduino. But out of curiosity is there a way that I can send the two values from the master to the slave and let it operate the conditions?
This my solution to send strings from Arduino to the next one: Sender code: String str = "This is my string and Basel is Cool :)"; int str_len = str.length() + 1; void setup() { // Begin the Serial at 9600 Baud Serial.begin(115200); // Prepare the character array (the buffer) char char_array[str_len]; str.toCharArray(char_array, str_len); Serial.write(char_array, str_len); //Write the serial data } void loop() { } Receiver code: char mystr[50]; //Initialized variable to store recieved data void setup() { // Begin the Serial at 9600 Baud Serial1.begin(115200); Serial.begin(115200); } void loop() { //String msg = ""; if(Serial1.available() > 0){ while(Serial1.available() > 0){ Serial1.readBytes(mystr,50); //Read the serial data and store in var } String rec; rec = String(mystr); Serial.println(rec); //Print data on Serial Monitor } }
Thanks for sharing, great video. I'm trying to make a sound sculpture using CCTV cameras/speakers and Arduinos communicating with each other if i can get the code right
I’ve got a question: when using wired serial communication; will this make other serial communications unavailable? Let say i need an Arduino UNO to Communicate with an Arduino Nano via wired connection; and still need the Arduino Nano (with Bluetooth, Wireless, etc) to communicate with other MicroControllers wirelessly. Is this possible, or the microcontroller will just listen to the wired connection?
I am trying to do this with an arduino Nano, as the sender and a pro micro as the receiver. It seems that everything is working except for the inter-arduino communication. I can see the "hellos" coming out of the nano on the serial monitor, I can also see the TX light flashing. I can see the pro-mico able to send data to the serial monitor, if I switch to that com port, for a moment, I put in a test message. But I am still not getting any data coming all of the way through.
Would this not work between an adafruit feather m0 and an adafruit feather 32u4 for some reason? I copied the code directly, and can not get it to work.
Maybe I am a bit too late for the awnser, but the problem is the 'char mystr[5] = "Hello";'. You need to write 'char mystr[6] = "Hello";' or 'char mystr[] = "Hello";', but I would prefer the second one.
And at 'Serial.write(mystr,5);' you need to write the right number. For example if you have a Word , that has 9 charakters, then write a 9 (Serial.write(mystr,9);).
Hi , I followed your tutorial and am not seeing any output from my "reciever" board. I have the tx/rx connected as per your diagram and have uploaded 2 seperate uno board with recieve/sender code from your website. From the default serial monitor of arduino I can see the sender sending "hello" but the reciever does not have any data to report through serial monitor. Thanks for any help.
Please connect TX pin of sender Arduino to RX Pin of receiver Arduino. For more details please share your screenshots to iotguider@gmail.com. Thank you.
The slave in this case would be the "sender", so modify the sender code to monitor it's own pins, and then send data back to the "master", or receiver. You can use Serial.println in the Master(receiver) to send data back to the send as well. Both the serial monitor and the slave(sender) are should be hearing everything that is on the serial bus.
@@nutzboi No, I don't think so, but you can have one master several slaves, and the distinction should not be important because weather master or slave, they should both be able to send or receive data, at least when the master makes the bus available to them. This is all theory however, If you read my other post, I have not been able to get this to work, and I don't know why not.
This is simple serial communication, there is no master or slave. I think you are confusing it with SPI, in which several Arduinos can be connected to one bus, one master and multiple slaves and the master chooses which slave unit is addressed.