So I have this project to implement, and my guiding teacher told me to transpond it into a real life situation: two cars going on a road, one has the LED and encryption part, the other one has the camera and decryption part.
The problem is I don't know how to start it, what modules to buy. Should I use 2 Arduinos, 2 Raspberry Pis (it has the camera module and Python libraries, making it easier for me), or 1 Arduino and 1 Raspberry Pi?
Is it a feasible project? If not, what changes should I tell my teacher to make regarding the nature of the project?
Sorry for my incomplete question, I am very new to microcontrollers.
The "trucks" closing each other was just an example for a basic Li-Fi communication protocol where LED will send an encrypted message (0 and 1) for the camera/photodiode to capture and decrypt.
Distance wise, maybe 50 cm apart, since it is a college project, and not an industry application.
With regards to coding, I haven't started yet, and I don't know whether I can make a camera match the speed of the LED blinking.
Basic questions are more about the transmission. If both cars drive in different directions. It's much easier if the cars drive back-to-front at short distance.
Next comes interference with other light sources. IR remote control uses a carrier frequency to distinguish a signal from ambient light.
I suspect that neither you nor your teacher did consider such technical problems, instead consider unrelated options like encryption of a simple 0/1 message. Which kind of encryption do you have in mind in an unidirectional communication between arbitrary cars?
But is using an IR LED still considered as Li-Fi communication? I heard people on the internet saying that it warps the line
I was the only one thinking of the possible problems that might arise when implementing, as my teacher left me alone to struggle with it, the 0 and 1 encryption is my smallest issue
As for the "cars" thing, my teacher wanted me to specialize my homework for some particular field, but let's just leave it at the "LED flashing towards a camera, head-on, with ambiental light to overcome" basic idea
I was thinking of IR because it is just easier to delimit ambiental light from the transmitting LED through separating the frequencies, until I found out that it kind of falls out of the visible spectre, which is the point of Li-Fi..
I will see if my teacher lets me use it though, thank you for your response!
You would not use a camera to receive the data, they are far too slow. Use a photodiode instead.
It would be straightforward to use the Arduino IRremote library to set up your own, custom data transmission system, and then you could use an IR LED for the transmitter, and a 38 kHz IR receiver module at the other end. They are cheap and work extremely well.