If and If Else Statement w/ Servos

Is it possible to use an if or if else statement to control the movements of servos? So, like if I'm getting data from an accelerometer and I want to use an if or an if else statement to get the servos to move corresponding to the changes the accelerometer picks up.

yes

Cool, thanks. :slight_smile: