Skip to content

This is a simple repository that contains various ways of encoding to morse and decoding morse in C.

License

Notifications You must be signed in to change notification settings

akchobby/Morse-Code-Convertor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Morse-Code-Convertor

This is a simple repository that contains various ways of encoding to morse and decoding morse in C. The algorithms implemented are a Binary tree traverse and a 2-D array traverse to decode. In spirit, the key idea to encode has been inspired from an answer in stack exchange.

Installation

Simple clone the repository to your local machine. The repo contains compiled executables for x86 architecture, one may need to recompile the C files if any issues arise.

Usage

Basic Array algorithm

Run the below command once in directory:

./bin/convert 

This code outputs a decoded morse message and encoded ASCII msg hard coded in main.c

Binary Tree algorithm

Run the command below, this executable accepts parameters as shown:

./bin/convert "<Your ASCII(in CAPS) msg or Morse Code>"

Note : While passing Morse code as a parameter use space as a seperator also put a space at the end of the code. A reminder to pass the parameter in quotes.

Examples

For ASCII

./bin/convert "SHE SELLS SEA SHELLS"

For Morse

./bin/convert "... --- ... "

By default (No parameters passed) the binary outputs the decoded morse code below:

--. --- --- -.. ---- .--- --- -... ---- --. ..- -.-- ...

About

This is a simple repository that contains various ways of encoding to morse and decoding morse in C.

Resources

License

Stars

Watchers

Forks

Packages

No packages published