-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathservo.h
More file actions
20 lines (16 loc) · 674 Bytes
/
Copy pathservo.h
File metadata and controls
20 lines (16 loc) · 674 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/************************************************************************/
// File: servo.h
// Author: Erlend Ese, NTNU Spring 2016
// Purpose: Servo driver for sensor tower
/************************************************************************/
/* AVR includes */
#include <avr/io.h>
#ifndef SERVO_H_
#define SERVO_H_
/* Initializes PWM for correct pins and timer for the servo
Non-inverted fast PWM, 20ms period, prescaler 64
Servo Output: PortD Pin 4 - 16bit Timer1 (OC1B) */
void vServo_init(uint8_t servoAngleDeg);
/* Set servo angle to a specific degree */
void vServo_setAngle(uint8_t ServoAngleDeg);
#endif /* SERVO_H_ */