In line with this hackathon, it makes it look more than 5 years old. Fun fact, it's flashing "Hello, World!", I had it flash the beginning to Alice in Wonderland but it was too long and Hello World felt more appropriate.

Inspiration

My Inspiration was Solely based on Code: The Hidden Language of Computer Hardware and Software by Charles Petzold. The intro story talks about how two children living across the street didn't have a phone, the only way they could communicate was flashlights. It walked me through the understanding of what it means to store, transmit and receive data. I wanted to replicate it using the fundamental tools I had, a resistor, LED and the GPIO pins of a raspberry pi.

What it does

It runs a python script to convert text into flashes of the led. The text is programmed using SSH to change the python script or manually changing the script on the MicroSD card on another computer.

How I built it

A raspberry pi continuously runs a python loop that interacts with the GPIO pin. The script has each character mapped out by me that corresponds with the proper dot-dash and pause for letter and word as well as punctuation. The script interacts with the GPIO pin changing the voltage high or low depending on if the LED should be on. The circuit is then completed using a resistor to ground. An SSH server is running so the message to display could be changed by changing the script.

Challenges I ran into

My main issue was the timing of the GPIO pin and getting the polarity of my LED right. I tried to fit the RPi I had in a flashlight but it was too big. I am also limited to using a chromebook as my only laptop, so my graphics and video presentation is lacking. Another challenge was finding out the right timing for on off, dot, dash, I know there is a library but I wanted to do everything from scratch. I had to make a switch statement for every letter.

Accomplishments that I'm proud of

I am proud of how little technology I used and kept an almost retro out of the garage lab feel. I have a CS degree and have not done any electrical engineering course outside of high school level physics. I am proud how I basically made a programmable flashlight that I can send Morse code messages through.

What I learned

I learned how important the hardware part of a circuit is when making a IOT driven device. I learned a lot about low level interactions of the GPIO pins and what hi and lo is and how certain LEDs would only work with at certain Voltages. I also learned how important clock timing when dealing with timing anything electronic that is controlled by a RPi.

What's next for MorsePi

I think a brighter and more LEDs would make a big difference. I would love to put it in a old flashlight. With the raspberry pi zero, and new skinny battery packs, I could have it run and change the message encoded on the fly from SSHing from my phone.

Built With

Share this project:

Updates