#include "MKL25Z4.h"
Servo myservo;
static int pos = 0;
void setup(){ myservo.attach(2) //PTA1 pin 2}
void loop(){ for (pos = 0; pos <= 180; pos += 1){ myservo.write(pos);}
for (pos = 180; pos >= 0; pos -= 1){ }}