# Calibrate

&#x20;Use this program to calibrate the angles of a servo. Press `A` to reduce the angle by 5 and `B` to increase it by 5.

```
Start
    Set angle to 90
    servo write pin PO to angle
    
Forever
    show angle

A Button Pressed
    angle =  max of 0 and angle - 5
    // look for the max of block in math
    servo write pin PO to angle
    stop animation
    // stop animation can be found under LED more...
    
B Button Pressed
    angle = min of 180 and angle +5
    servo write pin PO to angle
    stop animation
    
```

Make some changes to your program, have it start a 0 or 180,  Have the angle change by 1 degree  and then 10 degrees,&#x20;

## Before you move  on you should be able to answer

* [ ] Which direction is 90, 0 and 180
* [ ] What happens when the servo write pin PO code  is used
* [ ] Why did we need to use the max or min of
* [ ] What happened when we stopped animation
