2023-10-22 16:48:14 +00:00
|
|
|
/*****
|
|
|
|
* Copyright (c) 2023 - Poivron Robotique
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
*/
|
|
|
|
#include "pico/stdlib.h"
|
|
|
|
#include <stdio.h>
|
2024-03-15 22:45:05 +00:00
|
|
|
#include "QEI.h"
|
2023-10-22 16:48:14 +00:00
|
|
|
|
|
|
|
void main(void)
|
|
|
|
{
|
|
|
|
stdio_init_all();
|
2024-03-15 22:45:05 +00:00
|
|
|
QEI_init();
|
2023-10-22 16:48:14 +00:00
|
|
|
while(1){
|
2024-03-15 22:45:05 +00:00
|
|
|
QEI_update();
|
|
|
|
printf(">c1:%d\n>c2:%d\n", QEI_get(QEI_A_NAME), QEI_get(QEI_B_NAME) );
|
|
|
|
sleep_ms(10);
|
2023-10-22 16:48:14 +00:00
|
|
|
}
|
|
|
|
}
|