Using Arduino: Emulate dots and dashes telegraph transmission using a button and two LEDs. For instance, if...

80.2K

Verified Solution

Question

Electrical Engineering

Using Arduino:

Emulate dots and dashes telegraph transmission using a buttonand two LEDs. For instance, if a button is held longer than 500ms,then the red LED will turn on to represent a dash \"-\". and a shortpress will turn on the green LED to represent a dot \".\". Theproblem can be approached as a state machine where the states couldinclude \"wait_on_press\", \"delay_500ms\", and \"read_btn_val\".

Answer & Explanation Solved by verified expert
3.6 Ratings (641 Votes)
First we define pins where the red LED green LED and buttonsare present This is done in the void setup part of the codeFollowing this we write the actual code in the void loop In orderto use least external components the internal pull    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students