Simple implement button and motor assignment, all provided work, code, and schematic to finish assignment provided. MUST USE WORK PROVIDED TO COMPLETE, do not redesign. plagiarism check as well.

1 answer below »
Simple implement button and motor assignment, all provided work, code, and schematic to finish assignment provided. MUST USE WORK PROVIDED TO COMPLETE, do not redesign. plagiarism check as well.

Answered Same DayApr 12, 2022

Answer To: Simple implement button and motor assignment, all provided work, code, and schematic to finish...

Sathishkumar answered on Apr 12 2022
97 Votes
1. Objectives:
In this lab, we plan to achieve the following objectives:
a. Adding a button to previou
s work when the button pressed RED LED will be turned ON other LEDs will be turned OFF, when the button is not pressed THREE LEDs are cycling.
b. Adding a moto to previous work when the button pressed RED LED will be turned ON and Motor also turned ON other LEDs will be turned OFF, when the button is not pressed THREE LEDs are cycling and motor will be turned OFF.
2. Circuit Schematics:
3. Discussions
In this lab, we have learned about push buttons and motor, when the button is pressed 5V will be provided to Arduino input otherwise ground will be connected.
We have returned a separate function for Red led to glowing it Separately.
4. Code used in the lab
Problem 1:
#ifndef _traffic_light_H
#define _traffic_light_H
class _traffic_light { // creates the Class
int _redpin;
int _yellopin;
int _greenpin;

public:
_traffic_light(int redpin, int yellopin, int greenpin)
{

_redpin = redpin;
_yellopin =...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here