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.
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:):)
Design a program (C code for MSP430FRxxx family) to accomplish the following: A. make a design...
I. Design the C++ code for a program which will use the Pythagorean Theroem to calculate and display the length of a right triangle hypotenuse,c, given the lengths of its adjacent sides: a and b.. (hint: a^2 + b^2 = c^2) II. Design the C++ code for a program which will calculate and display the roots of a quadratic equation of the form ax^2 + bx + c = 0, given its coefficients, a, b, and c.
URGENT HELP NEEDED Convert the following C++ program into an x86 assembly language program. Comment the start of each "code block" that performs one of the listed mathematical calculations. Comments go to the right of the actual code, all starting on the same column. . // Global variables short a = 5; short b = 6; short c = 7; short d = 8; short e; short f; short g; short h; // Code int main() { ++d; ...
You want to design a digital watch using the private timer. Write the code with ARM assembly and C. Make your own decision on the language selection (Assembly and C). The followings are the coding requirements: Every second, the time information (hour minute second) should be sent to the UART terminal on PC The time starts from 00: 00: 00 Use some special ASCII characters to return back the cursor to the first column, when you display a new time....
This program should be written in C Thoroughly following the Code Conventions, write an efficient program, which ask the user for their numeric grade, and determines and displays the equivalent letter grade, based on the following information: Use appropriate data types and initialize the variables correctly Use the following grading scale: A: 90 - 100 B: 80 - < 90 C: 70 - < 80 D: 60 - < 70 F: 0 - < 60 If the input is invalid,...
URGENT HELP NEEDED :( Convert the following C++ program into an x86 assembly language program. Comment the start of each "code block" that performs one of the listed mathematical calculations. Comments go to the right of the actual code, all starting on the same column. Post ONLY your ASM file here to Blackboard when complete. // Global variables char a = 5; short b = 7; int c = 11; int d = 13; // Code int main() { ...
PLEASE DO IN C# AND MAKE SURE I CAN COPY CODE IN VISUAL STUDIO Program 2: Design (pseudocode) and implement (source code) a program (name it FeetMeters) to display a conversion tables for feet and meter as show below. Document your code and properly. Feet Meter 1.0 0.305 2.0 0.610 3.0 0.915 . . . . . . 19.0 5.7.95 20.0 6.100 Meter Feet 1.0 3.279 2.0 6.558 3.0 9.837 . . . . . . 19.0 62.301 20.0 65.574...
Write and implement a program that controls a traffic light in accordance with the following design features/specifications: A)The green light should be on for 10 seconds B)The red light should be on for 5 seconds C)The amber light should be on for 2 seconds D)The push button should cause the light to go to red 1 second after it was depressed.
Write and implement a program that controls a traffic light in accordance with the following design features/specifications: A)The green light should be on for 10 seconds B)The red light should be on for 5 seconds C)The amber light should be on for 2 seconds D)The push button should cause the light to go to red 1 second after it was depressed.
Please code in ARM cm4
Problem 5 Write a program that corresponds to the following C code: if (a > b) c = c + 5; if (a < b) c = c - 5; if (a == b) c = c + 10; Assume that a, b and c are 32-bit signed integers stored in memory at labels AO, BO, and Co, respectively.
Design a Shannon-Fano code and sketch the corresponding coding tree where the alphabet is {a,b,c,d,e,f} with corresponding probabilities {0.5, 0.1, 0.05, 0.05, 0.25, 0.25}