Question

Design a program (C code for MSP430FRxxx family) to accomplish the following: A. make a design...

Design a program (C code for MSP430FRxxx family) to accomplish the following:

A. make a design flowchart

B. Move a servomotor arm to 0° and hold there for 0.5 seconds.

C. Move the servomotor arm to 90° and hold there for 0.5 seconds.

D. Move the servomotor arm to 180° and hold there for 0.5 seconds.

E. Move the servomotor arm back to 0° and hold there forever.

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

Lets make it simple for understanding

Flow Chart:

Code:

#include<Servo.h>

Servo servomotor;

void setup()

{

servomotor.attach(9); //Give the proper pin number for example i have assumed my pin number to be 9

// We are going to write the program in setup because the question says that the process runs only once so no point of writing the code in loop

servomotor.write(0) // Initial angle as given in part A of question

delay(500) // For 0.5 seconds delay

servomotor.write(90) // Initial angle as given in part B of question

delay(500) // For 0.5 seconds delay

servomotor.write(180) // Initial angle as given in part C of question

delay(500) // For 0.5 seconds delay

servomotor.write(0) // Initial angle as given in part A of question

}

void loop()

{

}

Thank You:)

Please Give thumps up:):)

Add a comment
Know the answer?
Add Answer to:
Design a program (C code for MSP430FRxxx family) to accomplish the following: A. make a design...
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
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