Skip to main content

Posts

Showing posts from April 13, 2017

Arduino Project: Morse Code

Today during my conceptual physics class, my teacher introduced the Arduino developing kit, and we started working on it. I had a little experience of coding so it was not hard for me. Therefore, I created this Arduino project that can control the LED on the broad to spell my name using Morse code. This is the code that I wrote >>> int LED = 13; int dot = 300; int dash = dot * 3; int elemPause = dot; int charPause = dot * 3; int wordPause = dot * 7; char fName[] = "allen"; char lName[] = "lin"; void setup() {   pinMode(LED, OUTPUT); } void MorseDot() {   digitalWrite(LED, HIGH);     delay(dot); } void MorseDash() {   digitalWrite(LED, HIGH);     delay(dash); } void MorseElemPause() {   digitalWrite(LED, LOW);    delay(elemPause); } void MorseCharPause() {   digitalWrite(LED, LOW);   delay(charPause); } void MorseWordPause() {   digitalWrite(LED, LOW);     delay(wordPause); } void longP...