0
\$\begingroup\$

I have to design a project that uses an LED to transmit data and a LDR to receive the data or signal from the LED. But the problem is I have to use two Arduino UNO boards, one for LED transmit and another for LDR to receive. I know we can just use one Arduino board, but in my condition, my project is to have another advanced application that requires using two Arduino boards and have to separate the LED and LDR .So, how can the led transmit data? For example speed of car, so that LDR can receive data and display at the LCD? How to connect between the two Arduino?

\$\endgroup\$
3
  • \$\begingroup\$ Important things you will need to know before you can solve this problem: How far apart do the sender and receiver need to be? How often do you need to update the speed information at the receiver? How precisely does the receiver need to know the speed? How quickly can the information change (How quickly can the car change speed)? Also, if a connection (e.g. fiber optic cable) between the two devices is acceptable as implied by your last question, why do you need/want an optical connection instead of an electrical connection? \$\endgroup\$
    – The Photon
    Commented Feb 26, 2013 at 16:56
  • 1
    \$\begingroup\$ Lunia: please use proper English when posting. It is hard to read the post otherwise. I have corrected the major issues with the post. \$\endgroup\$ Commented Feb 26, 2013 at 19:09
  • \$\begingroup\$ my project is based on visible light communication,data transmission through the light.So, i have to use light as medium for data transmission.If i used electrical connection it would not be visible light communication.my project is each time the car break it will emitted break light in this case i used led,then it will transmit the speed of the car to the car behind to avoid collision.the car behind will receive data and control their speed.that is why i have to use two arduino board for two car. \$\endgroup\$
    – lunia
    Commented Feb 27, 2013 at 4:43

1 Answer 1

1
\$\begingroup\$

You can use the following library where IRtest2.ino does both tx and rx, depending upon it finding the receiver. There are other examples of doing just transmit and just receive.

Another receiver code that is more realtime. InputCapture.ino

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.