Question

Hi, I have a question about Atmel 8-bit AVR coding, so if you know the subject...

Hi, I have a question about Atmel 8-bit AVR coding, so if you know the subject please help me!

Please if you can, write code that will output an arbitrary string by blinking the LED(LED of the AVR Microcontroller board) in Morse code. The method you choose must output any standard null-terminated string containing characters A-Z or 0-9 in Morse code on the board's LED. For the demo, a child function, called from main( ) should output the string in Morse code, using a method that will work for any arbitrary string constant (in other words, main should pass the address of the null-terminated ASCII string to the child function) The program is recommended to have different functions for dot, dash, and spacing. (The functions can be called based on the desired output.)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The system that is developed must satisfy the following requirements:

  • It must execute on an Arduino. The Arduino version used was version 1.8.8. Most Arduino versions will work.
  • It must display a user typed string, such as “Hello World”, as Morse code on an LED (or several LEDs), or an LCD.
    • A dash is three times as long as a dot.
    • The time between each dot or dash in the same letter is equal to the duration of one dot.
    • The time between two letters is the duration of one dash.
    • The time between two words is the same duration as seven dots.
  • It must use a Round Robin design where a loop:
    • Waits for a string
    • Displays the string in Morse code
    • Exits the loop only if a sentinel is entered (e.g. !)

Here is the source code that you will need to load to your Arduino

Here are the steps for the Morse code LED system:

  • Step 1. Prompt the user to enter a message on the Serial Monitor. The input for the message contains characters (letters and/or numbers).
  • Step 2. Read each character, one at a time.
  • Step 3. Convert each character into the equivalent Morse Code.
  • Step 4. Convert each Morse code sequence into the corresponding sequence of dots and dashes.
  • Step 5. Transmit the dots and dashes to the LED while transmitting the message to the Serial Monitor.
  • Step 6. Exit the loop if user enters the sentinel value of “!”

The following components are used for the Morse code LED system. You will need:

  • Arduino Uno
  • Basic Red LED – 5mm
  • 330 Ohm Resistor, 1/4 Watt, 5% tolerance
  • Solderless Breadboard
Add a comment
Know the answer?
Add Answer to:
Hi, I have a question about Atmel 8-bit AVR coding, so if you know the subject...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • so i have my c++ code and ive been working on this for hours but i...

    so i have my c++ code and ive been working on this for hours but i cant get it to run im not allowed to use arrays. im not sure how to fix it thank you for the help our job is to write a menu driven program that can convert to display Morse Code ere is the menu the program should display Menu Alphabet Initials N-Numbers - Punctuations S = User Sentence Q- Quit Enter command the user chooses...

  • Please write code using Python. Rubric Assignment Solution Total: 100 pts Program successfully retrieves and validates...

    Please write code using Python. Rubric Assignment Solution Total: 100 pts Program successfully retrieves and validates user input 15 pts Morse Code Function Created 10 pts Function Uses Parameters to get input message 15 pts Function successfully converts passed message to Morse Code and returns the Morse Code equivalent of message 45 pts Program calls Morse Code function and outputs the result of the function (i.e. the actual Morse Code) 15 pts Main Function Requirement Part 2 MUST have a...

  • Hi everyone, I have a problem about C programming. Background Material: The figure 6 is as...

    Hi everyone, I have a problem about C programming. Background Material: The figure 6 is as below: The task: Download the file 55.c. Study the C code, then build an executable and run it to see what the output is. Modify the program so that the output is The string in buffer is "In C the value of 12 + 34 / 5 is 18." Do this by looking up decimal values for ASCII codes in Figure 6 and typing...

  • I have almost done with this code to Implement Huffman Coding. However I have an error...

    I have almost done with this code to Implement Huffman Coding. However I have an error at the "Heap<Tree>". Could anyone help with solving this issue, really appreciated. Thank you!! import java.util.Scanner; public class HuffmanEncoding { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter a text: "); String text = input.nextLine();    int[] counts = getCharacterFrequency(text); // Count frequency System.out.printf("%-15s%-15s%-15s%-15s\n", "ASCII Code", "Character", "Frequency", "Code");    Tree tree = getHuffmanTree(counts); // Create a Huffman tree String[]...

  • Hi, So I have a finished class for the most part aside of the toFile method...

    Hi, So I have a finished class for the most part aside of the toFile method that takes a file absolute path +file name and writes to that file. I'd like to write everything that is in my run method also the toFile method. (They are the last two methods in the class). When I write to the file this is what I get. Instead of the desired That I get to my counsel. I am having trouble writing my...

  • Write a cpp program Server.h #ifndef SERVER_H #define SERVER_H #include #include #include #include using namespace std;...

    Write a cpp program Server.h #ifndef SERVER_H #define SERVER_H #include #include #include #include using namespace std; class Server { public:    Server();    Server(string, int);    ~Server();    string getPiece(int); private:    string *ascii;    mutex access; }; #endif -------------------------------------------------------------------------------------------------------------------------- Server.cpp #include "Server.h" #include #include Server::Server(){} Server::Server(string filename, int threads) {    vector loaded;    ascii = new string[threads];    ifstream in;    string line;    in.open(filename);    if (!in.is_open())    {        cout << "Could not open file...

  • CSC Hw Problems. Any help is appreciated I dont know where to start let alone what...

    CSC Hw Problems. Any help is appreciated I dont know where to start let alone what the answers are. Your assignment is to write your own version of some of the functions in the built-in <string.h> C library. As you write these functions, keep in mind that a string in C is represented as a char array, with the '\0' character at the end of the string. Therefore, when a string is passed as a parameter, the length of the...

  • Note that the main function that I have provided does use <string.h> as it constructs test...

    Note that the main function that I have provided does use <string.h> as it constructs test strings to pass to your functions. However, your solutions for the 5 functions below may not use any of the built-in C string functions from the <string.h> library. Write a function called strcmp373. This function is passed two parameters, both of which are C strings. You should use array syntax when writing this function; that is, you may use [ ], but not *...

  • I need to get this two last parts of my project done by tonight. If you...

    I need to get this two last parts of my project done by tonight. If you see something wrong with the current code feel free to fix it. Thank you! Project 3 Description In this project, use project 1 and 2 as a starting point and complete the following tasks. Create a C++ project for a daycare. In this project, create a class called child which is defined as follows: private members: string First name string Last name integer Child...

  • I have updated my previously posted C++ question to ensure that I have included all of...

    I have updated my previously posted C++ question to ensure that I have included all of the necessary documentation in order to complete Part 2 - Bank Account of the assigned lab in its entirety. Please note that the lab below is somewhat lengthy, and I do not expect you to answer each question! If coding the full lab is too much to ask, please focus soley on Part 2 of the lab, titled Bank Account and the subsections that...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT