Example: PWM output and CAP input. More...
#include "stdio.h"#include <termios.h>#include <unistd.h>#include <errno.h>#include <sys/types.h>#include "libpruio/pruio.h"#include "libpruio/pruio_pins.h"
Go to the source code of this file.
Macros | |
| #define | _GNU_SOURCE 1 |
| Message for the compiler. | |
| #define | PMX 4095 |
| Default PMax value. | |
| #define | VHz 25 |
| The frequency for speed measurement. | |
Functions | |
| int | isleep (unsigned int mseconds) |
| Wait for keystroke or timeout. More... | |
| int | main (int argc, char **argv) |
| The main function. More... | |
Example: PWM output and CAP input.
This file contains an example on how to use libpruio to analyse pulse trains from a QEP sensor. The sensor signals can either come from a real sensor. Or, to avoid the need of a real sensor, the signals can get simulated by PWM output which is generated by this program. Find a functional description in section qep.
Licence: GPLv3, Copyright 2014-2023 by Thomas{ doT ]Freiherr[ At ]gmx[ DoT }net
Compile by: gcc -Wall -o qep qep.c -lpruio
Definition in file qep.c.
| int isleep | ( | unsigned int | mseconds | ) |