Arduino LED communication

Two Arduino boards have an LED pointed at each other, and by using the LED as a photodiode are able to detect the other LED flashing.
To start with they both flash briefly and then look for another LED’s flash, if they capture the tail of another flash they immediately flash again, which is detected by the other LED, which flashes again etc.
This leads to very fast backwards/forwards flashing, and at this point the two devices are synchronised and the second red LED lights up.

While synchronised, data can be transferred, by altering the length of the flash. Holding down the button on each arduino transmits a binary 1 instead of the normal 0, which lights up the LED on the other board.

While the software doesn’t yet support longer streams of data, I plan to add this support so that small pieces of data could be sent from one to the other, with all sorts of uses, such as door locks/authentication/etc.

Source code is available at https://randomskk.net/u/code/arduino/LEDcomms.html
(remove the space between LED and comms! YouTube inserted it apparently).

Duration : 0:0:38


Related Reading:

Incoming search terms:

Uncategorized

Be Sociable, Share!

Technorati Tags: arduino, electronics, LED

21 thoughts on “Arduino LED communication

  1. Nice! i can’t get …
    Nice! i can’t get the source code, only a 404 error when i follow the lik. Is there any other way to get the source code? Thank you.

  2. Nice! I can’t get …
    Nice! I can’t get the source code. When i follow the link i get a 404 error. Is there any other way to get it? Thank you.

  3. It’s actually 2 …
    It’s actually 2 arduinos running the same code and started at different times

  4. Really nice! …
    Really nice! Unfortunatly the link for the source code is dead. Do you mind sharing it again? Thanks a lot.

  5. I am trying to make …
    I am trying to make similar things. so I used atmega board and c code. Unfortunately my LED can’t sense another LED light. Should I use more bright LED? give me some advice. sorry for poor English.

  6. I don’t have a …
    I don’t have a project site for this one, as I started the site after making this, but I do plan to continue the idea and will probably post about the new implementation on my site, negativeacknowledge (google it). I’ve updated the video description to include a link to the source code.

  7. I use those USB …
    I use those USB boards, arduinos, as I had them handy at the time and was still playing with them. However, it can be done even with just an ATtiny13 or anything with GPIO pins, such as a PICAXE 08 or a PIC12F series.
    The basic idea is to connect BOTH pins of the LED to an IO port, then reverse bias the LED and check it after a fixed period of time, if it’s bright then the LED will read 0 and if it’s dark it’l read 1 – there’s more info on how this works online.

  8. that is so very …
    that is so very awesome. Any chance there’s a schematic, or do you need those fancy USB boards…whatever they are that you’re using.

    can normal LEDs be used as photodiodes?

  9. Nice, I espcialy …
    Nice, I espcialy like the Cybertool in the BG 🙂 do you have a project site for this? I’d love to look over the source and see more pics.

  10. very good idea, if …
    very good idea, if you can add upon it, to make it be able to push more info through…

Leave a Reply