-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkladblok.txt
More file actions
47 lines (37 loc) · 1.16 KB
/
kladblok.txt
File metadata and controls
47 lines (37 loc) · 1.16 KB
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
ShiftRegisterDriver(enable, latch, clock, sin):
void ShiftData(uint8_t data)
void ShiftData(bool data)
void EnableOutput()
void DisableOutput()
PwmDriver(config config, GpioPin& pin):
void SetDutyCycle(uint8_t dutyCycle)
MotorShieldControllerDc(ShiftRegisterDriver& shiftRegister, PwmDriver& pwmM1, PwmDriver& pwmM2, PwmDriver& pwmM3, PwmDriver& pwmM4 )
void SetDirection(Motor motor, Direction direction)
void SetSpeed(Motor motor, Percentage percentage)
CarController(MotorShieldControllerDc motorShield)
DriveForwards()
SystemTransportLayer -> SystemTransportLayerWithBondPercistence
Create new GapSt specific for our use case
GattSt can be reused
#define MOTOR4_A 0 0
#define MOTOR2_A 1 0
#define MOTOR1_A 2 0
#define MOTOR1_B 3 0
#define MOTOR2_B 4 0
#define MOTOR3_A 5 0
#define MOTOR4_B 6 1
#define MOTOR3_B 7 1
11000000 = motor a en b draaien naar links
Service Control:
Characterisitc: Speed left
write
Characterisitc: Speed right
write
Characterisitc: Direction left
write
Characterisitc: Direction right
write
Characterisitc: Stop
write
Characterisitc: ack
notify