Spent some time on the PyCharm Edu to learn Python and took a rotation at trying to make an LED light up. After that worked, I tried to get a buzzer to work. Once the buzzer worked, I wondered if I could use a dimming program for an LED on a buzzer to change its pitch. Totally worked!!! This was getting fun and I wanted a bigger project. So Nathan, Ingrid, and I were sitting talking about what could be done with the microcontroller and some LED's because there were no breadboards, and Nathan thought of a translator from text to morse! Taking it one step further using two LEDs (green and red) for the holidays was really the next natural step! :)
What it does
The program essentially takes an input string (ex. Happy Holidays) and breaks up each of its characters into Morse Code and outputs the data in flashes of two LED lights (of course in favor of the holidays).
How we built it
We used an Arduino 101 micro-controller, 2 LEDs, 2 220 ohm resistors, and the free Arduino application on Windows 10. The program script was run as such:
A script is written in the Arduino shell that works with a language very close to c, but isn't it quite exactly. It uses a multidimensional array to list all the letters of the alphabet and numbers 0 through 9 in rows that are arrays with entries of either 0,1, or -1. 0 corresponds to dot, while 1 corresponds to dash, and -1 corresponds to a stop command. A series of programs work to pull each individual character from the input string and convert it to ASCII and then to the number that corresponds to the correct row in the aforementioned matrix. That row is read by another program and each reading corresponds to a for loop that runs basic command to power the LED on and off for different time intervals depending on the dot or dash entered.
Challenges we ran into
No prior experience programming in C was had in the group, so just learning syntax to a certain extent was a challenge of its own. As that became less of a challenge, however, building the programs that would pull a character from a string and translate it to Morse was difficult. Many thanks to Dr. Murrell, David Grossman, Nathan Fox, and many others who helped teach how to operate in c. Another small obstacle that took too long to figure out was how to make the Morse code only be displayed once and not repeated. Thanks to Pedro for the help on that one!
Accomplishments that we're proud of
We successfully can turn any string into Morse code and display that code using LED lights! We can control exactly how long a dot, dash, and pause are by variable manipulation Learning basic coding in c was seemingly to formidable at first, but even that came in the end Using simplicity in the script design and using 2 LEDs
What we learned
Arduino shell operates very close to c, and NOT Java :) (Thanks Dr. Murrell) To use a low level programming language requires a different line of thinking than a high level one SOOOOO many things about coding in general can't list them all!
What's next for Morse Holidays!
I think it would be incredible to use a light sensor to do the opposite and take flashes of light and turn them from Morse code into text! This board could be put on independant power and put on an RC plane or weather balloon and transmit a message to anybody who cares to look up and see, or connect it to radio pulses instead of lights so the code can be picked up by radio