This is the second project using the LinkIt One board in the previous instructable I showed you how to build a distance measuring tape.
In this tutorial I'm going to show you how to make a Morse Code Decoder/Encoder using the LinkIt One. The output can be displayed on an LED or a Buzzer, this project can encode/decode up to 300 words per minute. This is a fun project and can built over the weekend, we can set up two of these and communicate with each other.
So lets get started....
Step 1: Requirements
Lets start with gathering is all the parts.
- LinkIt One
- Some Jumper wires
Once you have all the parts its is time to get started...
Step 2: Circuit
The circuit is quite simple all you have to connect is the LED at digital pin 2 (anode to Digital Pin 2 and cathode to Gnd pin). The button is to be connected to Digital Pin 7, you can try out the Arduino button example to get familiar with LinkIt One and a button.
The output is displayed by flashing the LED you can set a lower word per minute rate to make the Morse code readable.
Step 3: Code
The code can found bellow, you need an Arduino IDE with the LinkIt plugin to get the code uploaded to the board. You can edit the words per minute rate in the code by default it is set to 15wpm. You should upload the code to the LinkIt One on the right Com port and then open a serial terminal. For the serial terminal you can use the default Arduino terminal or Putty or Teraterm.
Step 4: Encoder
For the encoder part of the project, we can enter the text to be encoded in a serial terminal you set up in the previous step. Make sure you work in the right port it is usually the second of the LinkIt One ports. I always leave a the terminal window open on that port.
Once you have opened the port, enter the text and you should see the Led flash according to the Morse code if the code is too fast to be readable decrease the wpm in the code.
Step 5: Decoder
For the second part the output text is displayed on the serial terminal you set up and have running. And to feed in the code we use the button make sure you have a Morse code chart for reference. Once you enter some text you should see the LinkIt One decode it live time and output the text on the serial window.
Step 6: Going Further
Hope you had fun building this project, now its time for an upgrade since this project is both an encoder and a decoder you can make two of it and keep one in two different places and try using the 300wps rate.
If you encountered any problem feel free to leave a comment below or PM me.