-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSetup.h
51 lines (39 loc) · 1.01 KB
/
Setup.h
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
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef SETUP
#define SETUP
#define LEFTMOTORPWM 10
#define LEFTMOTORP 8
#define LEFTMOTORM 9
#define RIGHTMOTORP 11
#define RIGHTMOTORM 12
#define RIGHTMOTORPWM 13
#define LSENSEIN 4 //these are use for calibration
#define RSENSEIN 3
#define LEFTSENSEIN 5 // theese are left most sensor and right most sensor
#define RIGHTSENSEIN 2
#define S0 90
#define S1 101
#define S2 23
#define S3 45
#define MOTORPc 100 //this is nothing :)
class Initializer{
public:
static void initializePins(){
pinMode(LEFTMOTORP,OUTPUT);
pinMode(LEFTMOTORM,OUTPUT);
pinMode(LEFTMOTORPWM,OUTPUT);
pinMode(RIGHTMOTORP,OUTPUT);
pinMode(RIGHTMOTORM,OUTPUT);
pinMode(RIGHTMOTORPWM,OUTPUT);
pinMode(S2,OUTPUT);
pinMode(S3,OUTPUT);
pinMode(LSENSEIN,INPUT);
pinMode(RSENSEIN,INPUT);
//for activating blue filter for the initial position
digitalWrite(S2,LOW);
digitalWrite(S3,HIGH);
//fo setting up the frequency
digitalWrite(S0,LOW);
digitalWrite(S1,HIGH);
};
};
#endif