English - xelaco/vlc_raspi_arduino GitHub Wiki

Welcome to the vlc_raspi_arduino wiki!

This project is designed to make a Raspberry Pi and an Arduino communicate by means of two identical LEDs.
A LED can make light, however, it can also act as a photoresistor, but it can only receive light of the color it can produce. So the LEDs must be strictly identical. It is interesting because you do not need to add a filter to prevent other lights to influence the signal.
This is a one-way communication because the two circuits are not the same.

Sender

The sender is a Raspberry Pi with an input device (keyboard, for instance).

Requirements for the sender

Raspberry Pi
Same LED as receiver
Wires
"wiringpi" library (go to wiringpi.com if the program cannot be compiled)

Circuit

LED: (+) to BCM pin 17 (physical pin 11) /// (-) to ground (physical pin 9, for example)

Compilation command

First, you need to compile the sender's program on a Raspberry Pi. This command must be executed in the directory where "sender.c" is stocked!
gcc -Wall sender.c -lwiringPi
To execute the program:
./a.out

Receiver

The receiver is a Arduino with a LCD (16x2 characters).

Requirements for the receiver

Arduino
Same LED as sender
Wires
1 Mohm resistor
LCD circuit:

  • LCD 16x2
  • 10 Kohm potentiometer
  • 220 ohm resistor
  • Wires
  • Breadboard

Circuit

LED: (+) to pin A0 /// (-) to ground
Resistor 1 Mohm: in parallel with the LED
LCD circuit: see Arduino official documentation to have a diagram

LEDs

The LEDs must be very near (it should be possible to increase distance using more powerful LEDs) and aligned.

xelaco 2018