Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Introduction Many embedded systems are written in C/C++. Since you are building skills in this area, it is important that you are introduced to such
Introduction
Many embedded systems are written in C/C++. Since you are building skills in this area, it is important that you are introduced to such an application. We will simulate an Arduino, a simple and popular microcontroller, using this free online editor:
https://www.tinkercad.com/
Our goal is to combine a servo motor, a button, and an LED to create a simple device that could be used for something like an electronic lock!
Instructions
- Create a project where you combine a button, a servo, and an LED into one Arduino controller
- Switch your editor to use only C++ text. You may not edit your code using the block editor.
- Combine the code from each project. Some of the demo code may not be needed.
- You do not need a loop to move your servo, even though the servo demo has one.
- If the user has the button pressed down, move the servo to position 180 and turn the LED on.
- If the button is not being pressed, move the servo to position 0 and turn the LED off.
- Write a delay at the end of your loop function, something like delay(15), so the simulator does not get overwhelmed.
- This system could be used for something like an electronic lock.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started