Chen Wei Ting
/
LSM9DS1_project_3
read encoder
Diff: encoder.h
- Revision:
- 1:2f2a74337b77
- Parent:
- 0:f2657b94ea70
- Child:
- 2:33062fc279ca
--- a/encoder.h Tue Jul 31 12:18:02 2018 +0000 +++ b/encoder.h Tue Jul 31 13:24:56 2018 +0000 @@ -1,4 +1,24 @@ #ifndef _ENCODER_H_ #define _ENCODER_H_ -#include "mbed.h" \ No newline at end of file +#include "mbed.h" + +extern void init_encoder(); +extern void init_SPI_encoder(); +extern void angle_measure(); +extern int angle_count(unsigned short,unsigned short); + +extern DigitalOut encoder_cs; +extern SPI spi_encoder; + +extern unsigned short encoder_value; +extern unsigned short angle; +extern unsigned short angle_old; +extern int angle_dif; +extern int a_dif; +extern int Angle; +extern unsigned short angle_init; +extern unsigned short k; + + +#endif \ No newline at end of file