53 lines
1.4 KiB
C
53 lines
1.4 KiB
C
#include "pico/stdlib.h"
|
|
|
|
#define CONTACTEUR_ACTIF 0
|
|
#define CONTACTEUR_INACTIF 1
|
|
|
|
#define DOIGT_TIENT 1
|
|
#define DOIGT_LACHE 0
|
|
|
|
#define BRAS_PLIE 0
|
|
#define BRAS_POT_SOL 1
|
|
#define BRAS_POT_POT 2
|
|
#define BRAS_ECARTE 3
|
|
#define BRAS_DEPOSE_JARDINIERE 4
|
|
#define BRAS_HAUT 5
|
|
#define BRAS_LEVITE 6
|
|
|
|
#define NB_BRAS 6
|
|
|
|
#define PLANTE_BRAS_1 0x01
|
|
#define PLANTE_BRAS_6 0x02
|
|
|
|
enum validite_vl53l8_t{
|
|
VL53L8_INVALIDE=0,
|
|
VL53L8_BORDURE=1,
|
|
VL53L8_PLANTE=2,
|
|
VL53L8_DISTANCE_LOIN=3,
|
|
};
|
|
|
|
void i2c_annexe_gestion(void);
|
|
|
|
void i2c_annexe_envoie_score(uint8_t score);
|
|
|
|
uint8_t i2c_annexe_get_contacteur_butee_A(void);
|
|
uint8_t i2c_annexe_get_contacteur_butee_C(void);
|
|
|
|
uint8_t i2c_annexe_get_contacteur_longer_A(void);
|
|
uint8_t i2c_annexe_get_contacteur_longer_C(void);
|
|
|
|
void i2c_annexe_get_distances(uint8_t *distance_capteur_cm);
|
|
void i2c_annexe_couleur_balise(uint8_t couleur, uint16_t masque_led);
|
|
|
|
void i2c_annexe_set_mode_VL53L8(enum validite_vl53l8_t mode);
|
|
uint8_t i2c_annexe_get_tension_batterie(void);
|
|
void i2c_annexe_get_VL53L8(enum validite_vl53l8_t *validite, float * angle, float * distance);
|
|
|
|
void i2c_annexe_actionneur_pot(int actionneur, uint8_t pos_bras, uint8_t pos_doigt);
|
|
void i2c_annexe_attrape_plante(uint8_t action);
|
|
void i2c_annexe_init(void);
|
|
|
|
void i2c_annexe_ferme_doigt_plante(void);
|
|
void i2c_annexe_ouvre_doigt_plante(void);
|
|
void i2c_annexe_mi_ferme_doigt_plante(void);
|