Lib for Gobeur action
gobeur_lib.h
- Committer:
- mondiaye
- Date:
- 2021-07-05
- Revision:
- 2:853546cbc5fe
- Parent:
- 1:f18f5b34eece
File content as of revision 2:853546cbc5fe:
// ----- Variables ------- #define GOBEUR_RIGHT 0 #define GOBEUR_LEFT 1 // ~ PIN ~ PinName servo_aspire_1_pin = PA_9 ; // ? Right PinName servo_aspire_2_pin = PB_6 ; // ? Left PinName servo_block_1_pin = PA_15 ; // ? Right PinName servo_block_2_pin = PB_7 ; // ? 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) ; void gobeur_action(const gobeur_node::Gobeur& gobeur_msg);