TUK Workshop

Dependencies:   mbed lib_workshop_2019

includes/pin_connexions.h

Committer:
tuk4
Date:
2019-10-24
Revision:
9:f1dc5709a98d
Parent:
8:c2d06715025f

File content as of revision 9:f1dc5709a98d:

#ifndef PINCONNEXIONS_H
#define PINCONNEXIONS_H

#include "VMA306.h"
#include "CMPS03.h"

#define COMPASS_adress     0xC0
#define PIXY_adress         0x54

#define CC_BLOCSIZE         14
#define N_BLOCSIZE          12

#define N_BLOCCODE          0xAA55
#define CC_BLOCCODE         0xAA56


typedef unsigned char   Byte;
typedef unsigned short  Word;
typedef unsigned long   lWord;


/****************************************/
/* TO DO 1 : Declare the Serial connexion */
/****************************************/
// Place your Serial declaration here

Serial pc (PA_2, PA_3, 115200);



/****************************************/
/**         CNY declarations           **/
/*          To be completed             */ 
// Declare your CNY70 here
AnalogIn cny_1 (PA_7); 
AnalogIn cny_2 (PC_2); 
AnalogIn cny_3 (PC_3); 

/**     End of CNY declaration         **/
/****************************************/


/****************************************/
/**     Motor by PWM declarations       **/
/*          To be completed             */ 

DigitalOut DIR_1L (PC_9);
DigitalOut DIR_2L (PC_8);
DigitalOut DIR_1R (PC_6);
DigitalOut DIR_2R (PC_5);

PwmOut  Pwm_ML (PA_9);
PwmOut  Pwm_MR (PA_8);
 

/**  End of Motor by PWM declarations  **/
/****************************************/

/* Proximity sensors */
VMA306      ultra_sonic       (PB_13, PB_2, PB_14, PC_7, PB_15, PA_6);

/* Compass sensor */
CMPS03      compass           (PC_4);

/*    Interrupt   */
InterruptIn blue_button_interupt (PC_13);

#endif /* PINCONNEXIONS_H */