Create Your Custom Character for LCD in Arduino

Was working my wife’s Sparkfun Red Board I had bought for her birthday :) . I think I am having more fun with it than her.

The first thing I wanted to do was to write I ♥ U on the LCD, to show my lovely wife how an awesome thing the Arduino board is.

So the secret is creating a byte array. And using createChar() which is a method of the LiquidCrystal library that Arduino.

Have fun!

Morse Code

Morse Code with Python

Morse code is an awesome tool. I have always been amazed by it. I remember my mom and dad buying me a walkie-talkie that had the morse code on a sticker on the side. I would click on the beep button on the walkie-talkie to make the sound. It always reminded me of the starting theme of the old(1941) Superman cartoons. Although not from that era had an old VHS tape that I certainly watched more than a couple of times.

When a software engineer looks at the code it will be apparent to them that the code was not written by a person with the knowledge of computer coding. The code was actually developed by Samuel F. B. Morse in 1836 who was an artist.

J38TelegraphKey

Telegraph Key

Don’t get me wrong. I really like how a lot of times science gets combined with art. But I do wish it was more… binary. Yeah… That is what I was looking for.

So you may ask why  the hell is John talking about Morse code. Well the reason is that I am working on a small weekend project (one of several).

I do welcome any ideas or help with this nice little project. It will be using some DSP (Digital Signal Processing) later. Which was always my favorite subject.

The general idea is to encode text to Morse code (sound) send it via some network means to another computer which will than translate (decode) Morse sound to text.

Encode Decode Morse Code

 

Of course first we need to encode our text to Morse code. A small sample of the Morse code can be found below;

450px-International_Morse_Code.svg

The small cool script below basically turns text to sound. It is important to note the rules 3, 4 and 5 in the image above which I didn’t know about before. In the code I denoted ‘*’ as the space between two letters while ‘|’ as the space between two words.

In the next part I will be using some cool Python code to record and sample the sound created by this script. And in the final part I hope to decode the Morse code.

You can find the code for this post here: https://github.com/JohnRoach/morse

For now,

Have fun!