Initial commit
This commit is contained in:
28
AS5600L/main.c
Normal file
28
AS5600L/main.c
Normal file
@@ -0,0 +1,28 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user