Lib for Gobeur action

Dependents:  

gobeur_lib.h

Committer:
mondiaye
Date:
2021-07-05
Revision:
0:7312173b8d5f
Child:
1:f18f5b34eece

File content as of revision 0:7312173b8d5f:


// ----- Variables -------
#define GOBEUR_RIGHT 0
#define GOBEUR_LEFT 1

// ~ PIN ~ 
PinName servo_aspire_1_pin      = PA_10 ; // ? Right
PinName servo_aspire_2_pin      = PA_10 ; // ? Left
PinName servo_block_1_pin       = PA_10 ; // ? Right
PinName servo_block_2_pin       = PA_10 ; // ? Left
 
// ~ Status ~ 
int gobeur_right_status          = -1 ;  // 1 : blocked    0 : opened
int gobeur_left_status           = -1 ;  // 1 : blocked    0 : opened

int gobeur_right_aspire     = -1 ;  // 1 : suck  0 : do nothing 
int gobeur_left_aspire      = -1 ;  // 1 : suck  0 : do nothing 

int init_status          = -1 ;  // 1 : initalize 

int game_status          = -1 ;  // 1 : in game    0 : end game  


// ------ Functions --------- 
void gobeur_initialize() ; 
int aspirateur_on(uint8_t gobeur_id) ; 
int aspirateur_off(uint8_t gobeur_id) ; 
int block_gobelet(uint8_t gobeur_id) ; 
int unblock_gobelet(uint8_t gobeur_id) ;