Servo Sg90 Troubleshoot C Code for an Embedded System

Thread Starter


Joined Apr 5, 2016

Attached is my code for a college project using the msp430g2553 to program a robot that serves different kinds of drinks with different kinds of inputs and such.

What I need help with is to make the Servo Sg90 move from 0 to 90 degrees when BIT4 is pressed and for it to stay there depending on the size of the cup chosen (small, medium, or large). Once the delay is over, I want it to go back from 90 degrees to 0 and for the timer to stop until the button is pressed again.

I would also like to know if the timer setup is correctly done because I am using P2.6 instead of P1.2 in the peripherals of the msp430.

Thank you in advance. Any Help would be of great aid.