You can use MATLAB to transmit a letter or a sentence via USB port to optical transmitter such as LED. For algorithm you can see the paper using the following link.
PC to PC data transmission using visible light communication(https://ieeexplore.ieee.org/document/8117767/)
In a simulation program (such as MATLAB) the bit sequence can be generated based on a De Bruijn bit sequence (DBBS) of length 2^N, which is equivalent to a pseudo-random binary sequence (PRBS) 2^N – 1 with an additional “0” bit inserted into the longest chain of zeros. In the DBBS-generated bit pattern, every possible distinct bit combination occurs exactly once, thus correctly representing the average distribution of bit combinations generated by the statistically independent data generator.
Ref: Bit Pattern length dependence of intrachannel nonlinearities in pseudolinear transmission. IEEE Photonics Technol. Lett. 2004, 16, 1591-1593.