Need suggestions about serial communication between two arduinos

Hello everyone,

I made an analog circuit after seeing it online to transmit sound with cheap laser pointers. Now I want to upgrade that to a college project in which I can do digital communication between two arduinos and show its practical utility as a communication link.

This is how I think it should be connected. I will connect Tx pin of transmitter to a circuit to produce correct voltages for the biasing of laser. At receiver input will strike a small calculator solar panel or an LDR, a schmitt trigger will be used to change the levels to correct TTL after reception and then it will be given to Rx pin.

Now, I haven't done much programming in arduino or any microcontroller for that matter, but once when I was doing something like this using arduino I noticed that during serial communication it will continuously spit 0s or 1s depending on pull up or pull down even when no data is coming.

How can I implement something like a start and stop bit so that the arduino only responds when a correct byte is received.

Basically I want to give some input through a keypad or something from the Tx and display that input on an LCD at Rx or control some devices based on what input is coming.

At receiver input will strike a small calculator solar panel or an LDR,

No not fast enough you need a photo transistor or photo diode.

I noticed that during serial communication it will continuously spit 0s or 1s depending on pull up or pull down even when no data is coming.

Yes that is how serial data works. It is always high when there is no data.

How can I implement something like a start and stop bit so that the arduino only responds when a correct byte is received.

That is what will happen automatically when you do a serial read or write (print).

Alright. Thank you very much. I will try this to work out as soon as I finish building my s3v3. I already have a UNO, then I will update the results here.

And as for the Photodiode and Photo transistor, I have got both of these, I will try both. Thanks for the tip :slight_smile:

Google this:
aruino + laser modem

will find a few sites like this, where the comm's part of what you are asking has been done before.

Another good site (if you want to see the "extreme" version of what you are trying to do):

Something to keep in mind - at the receiving end you may want to use a lens (cheapo magnifying glass lens will be OK), depending on the distance covered...

Thanks for the links and tips cr0sh and CrossRoads. i am going through the links and searching a bit too. I hope I can do this :slight_smile: