To run the code, you are going to need two Arduino boards. Both can be connected to the same computer, but the one running the decoding file needs to be the one communicating with the Arduino IDE. Make sure you are using Python3.
Make sure there is a resistor in series with the IR LED to ensure that the forward voltage and current requirements are met. Here are the specifications of the LED used in the original study. Here are the IR Breakbeam sensors used as receivers. If you are confused as to how to use the breakbeam sensors, follow the tutorial that is on the product page.
To run the display code, you can follow this tutorial. It makes use of the tkinter
Python library to capture and display the information from the serial monitor.
If you want to change the message, you can directly edit the message in the IR_Morse.ino
file.
See Figure S6 for the circuitry. Photo-resistors can be puchased from Adafruit.