Hi, I am using an Arduino Uno on which almost all pins are used(only pin A5 is not used). I just wanted to link another Arduino Uno to it using SoftwareSerial library so that I get more pins. I want to leave pins 0 and 1 free of both arduinos for debugging. I have read about the tutorials on how to use two Arduinos together but using pin 0 and 1. And I haven't seen any tutorial to connect via SoftwareSerial. I don't have two Arduinos yet. I don't want to buy the second one until I am sure if linking them is possible otherwise it will be a waste of money to me.
My plan is to put half the components of my project to the second Arduino. This will leave few pins free on both Arduinos to add extra components and leave two pins on each Arduino to link via SoftwareSerial.
So, I just want to know if it is possible to link two Arduinos together? and if yes, then how?
This is my first post and I feel that I made it too lengthy so I apologize for that but I will make sure that soon I will learn how to use these forums efficiently.
You can use SoftwareSerial just like HardwareSerial - it just does not work at high speed. Start with 9600 baud.
Normally SoftwareSerial works with 2 pins (Rx and Tx) and I'm not sure how you can set it up so it just uses one pin - either Tx or Rx as appropriate. I have used one-sided serial when I was short of pins - but not using the SoftwareSerial library.
Maybe you can set up SoftwareSerial in the normal way and then just use pinMode() to set the unwanted pin back to whatever you want it to be.
Remember to have a common GND between the two Arduinos.
I presume you are aware that this would be much easier with 2 Megas which have 3 spare HardwareSerial ports.
There are examples of its use in the software serial library. Once you have them linked you need a protocol so they can talk to one another. Some great info on serial port use is serial input basics.
We might be able to help you get the project on one Uno if you provide a schematic of your project. There are many ways to expand the number of pins available with port expanders, shift registers, etc.
Okay I understood now that it is possible to link Arduino using software serial. that's all I needed. Thanks a lot friends . I'll soon make a tutorial on my project