Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a flow chart for the following Arduino program int motorPin1 = 9;// variable to store pin number for motorpin 1 int motorPin2 = 7;//

Write a flow chart for the following Arduino program

int motorPin1 = 9;// variable to store pin number for motorpin 1 int motorPin2 = 7;// variable to store pin number for motorpin 1

void setup() { Serial.begin(9600); pinMode(motorPin1,OUTPUT);// set motor pin 1 as output pin pinMode(motorPin2,OUTPUT);// set motor pin 2 as output pin pinMode(10,OUTPUT); // set pin 10 as output pin which is connect to the EN pin in L293D

}

void loop() { digitalWrite(10,HIGH);// turn on the motor

//start rotetation of the motor : digitalWrite(motorPin1, HIGH); digitalWrite(motorPin2, LOW);

delay(10000);

// stop rotetion of the motor: digitalWrite(motorPin1, LOW); digitalWrite(motorPin2, LOW);

delay(3000);

// start rotetion in oposite direction: digitalWrite(motorPin1, LOW); digitalWrite(motorPin2, HIGH);

delay(10000);

// stop rotetion of the motor: digitalWrite(motorPin1, LOW); digitalWrite(motorPin2, LOW);

delay(3000); }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

Students also viewed these Databases questions

Question

How are members held accountable for serving in the assigned roles?

Answered: 1 week ago

Question

Write a Python program to check an input number is prime or not.

Answered: 1 week ago

Question

Write a program to check an input year is leap or not.

Answered: 1 week ago