Files

29 lines
557 B
C
Raw Permalink Normal View History

2026-03-31 13:10:37 +02:00
#include "pico/stdlib.h"
#include "pico/time.h"
#include "hardware/i2c.h"
#include <stdio.h>
#include "AS5600L.h"
#define I2C_PORT i2c0
#define I2C_SDA_PIN 8
#define I2C_SCL_PIN 9
int main() {
stdio_init_all();
sleep_ms(1000);
AS5600L as5600l;
as560x_init(&as5600l,I2C_PORT,100000,I2C_SDA_PIN,I2C_SCL_PIN);
int abs = 0;
abs = update_pos;
while (true) {
// abs = update_pos(&as5600l);
// printf("Position absolue : %d\n",abs);
sensorData(&as5600l);
}
return 0;
}