|
final project
1
|
distance measurement for ping sensor More...
#include "main.h"Go to the source code of this file.
Macros | |
| #define | period 20 |
| #define | clockwise 0x4E000 |
| #define | cclockwise 0x47500 |
| #define | TIMER4B_PRESCALER 50 |
Functions | |
| void | TIMER3B_Handler (void) |
| handles interrupts More... | |
| void | ping_init () |
| initializes ping sensor More... | |
| void | send_pulse () |
| sends a pulse to the ping sensor More... | |
| int | ping_read () |
| reads the response pulse from the ping sensor More... | |
| double | time2dist (int time) |
| convert a sonar pulse width time to a distance More... | |
| void | clock_timer_init3 (void) |
| initializes a clock timer More... | |
Variables | |
| volatile int | overflow |
| volatile int | rise_time |
| volatile int | fall_time |
| volatile int | j |
| volatile float | servo_angle |
| void clock_timer_init3 | ( | void | ) |
| void ping_init | ( | ) |
| int ping_read | ( | ) |
| void send_pulse | ( | ) |
| double time2dist | ( | int | time | ) |