-
Notifications
You must be signed in to change notification settings - Fork 0
/
Movement.c
37 lines (29 loc) · 1.11 KB
/
Movement.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <motor.h>
void main()
{
Sound_Init(&PORTC, 0); // Init Sound
while(PORTA.F4==1);
Sound_Play(2000,50); // 2 kHz sound ON RC0
Forward(255); // Call Forward
Delay_ms(2000);
Sound_Play(2000,50); // 2 kHz sound ON RC0
S_Left(255); // Call Spin Left
Delay_ms(800);
Sound_Play(2000,50); // 2 kHz sound ON RC0
Forward(255); // Call Forward
Delay_ms(2000);
Sound_Play(2000,50); // 2 kHz sound ON RC0
S_Right(255); // Call Spin Right
Delay_ms(800);
Sound_Play(2000,50); // 2 kHz sound ON RC0
Forward(255); // Call Forward
Delay_ms(2000);
Sound_Play(2000,50); // 2 kHz sound ON RC0
S_Left(255); // Call Spin Left
Delay_ms(800);
Sound_Play(2000,50); // 2 kHz sound ON RC0
Backward(255); // Call Backward
Delay_ms(1000);
Sound_Play(2000,50); // 2 kHz sound ON RC0
Motor_Stop(); // Stop all
}