I was thinking about the algorithm that i will use in my project, i was wondering if it’s correct or is there another method to do it !
it’s about sending data (Text) using a LED/LASER DIODE, fiber optic and a photoresistance !
First step, i wanna send only a char, and the only way to do it is basically in Binary code.
so let’s take an example:
the ascii code of A is 41H => (0100 0001)b
the led will blink depending on the bits (0 = 2.5V and 1 = 5V)
the phototransistor will get and stock these values in a table, i will get something like that XYXX XXXY
and i’m going to convert it to binary (X=0 and Y = 1), after write it down in the serial monitor
Am i right ? is there any suggestions ? i’m waiting for your comments
The easiest way to handle the timing challenge in this is to use regular Serial Asynchronous signals. See "Software Serial" and File>Examples>Communications in the Arduino IDE.
A photoresistor is slow as a receiver and will limit your speed (Baud Rate). Using IR LED and IR Phototransistor may be better. But a small Laser Diode would be good in that you can SEE the signal is working...
DISCLAIMER: Mentioning stuff from my own shop as examples...
IR LED HERE:
IR Phototransistor HERE:
If you want to use 38KHz Infrared signals, this Receiver HERE:
Laser Diode HERE:
Information on sending/receiving 38Khz Infrared Signals is on the ArduinoInfo.Info WIKI HERE: