| Algorithm 7. Laser Signals to Binary: |
| Laser Signals to Binary Conversion Algorithm : Translates the laser pulses received by the solar cell back into binary data, ensuring the LCS receiver can reconstruct the original data. |
| Input: Laser signals read through solar cell |
| Output: Binary data |
| 1. binary_data = ”” |
| 2. while laser_signal_is_present() do |
| 3. if laser_intensity() >threshold do |
| 4. binary_data + = ‘1’ |
| 5. end if |
| 6. else do |
| 7. binary_data + = ‘0’ |
| 8. end else |
| 9. delay() |
| 10. end while |
| 11 return binary_data |