add motion contoller test
This commit is contained in:
parent
ed1725c392
commit
2d76ca73ef
19
main.c
19
main.c
@ -36,6 +36,11 @@
|
|||||||
*
|
*
|
||||||
* */
|
* */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 0: motor test
|
||||||
|
* 1: NFC test
|
||||||
|
* 2: motioncontroller test
|
||||||
|
*/
|
||||||
#define TEST 1
|
#define TEST 1
|
||||||
|
|
||||||
const uchar STEP_PINS = BIT4 | BIT5;
|
const uchar STEP_PINS = BIT4 | BIT5;
|
||||||
@ -84,7 +89,7 @@ int main(void)
|
|||||||
|
|
||||||
SPIInit();
|
SPIInit();
|
||||||
MDInit();
|
MDInit();
|
||||||
//MCInit();
|
MCInit();
|
||||||
NFCInit();
|
NFCInit();
|
||||||
|
|
||||||
__delay_cycles(16000000);
|
__delay_cycles(16000000);
|
||||||
@ -131,6 +136,18 @@ int main(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if TEST == 2
|
||||||
|
|
||||||
|
while(1){
|
||||||
|
MCSetV(MC_MotorL, 1000);
|
||||||
|
MCSetV(MC_MotorR, 1000);
|
||||||
|
__delay_cycles(32000000);
|
||||||
|
MCSetV(MC_MotorL, -1000);
|
||||||
|
MCSetV(MC_MotorR, -1000);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user