-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDriveBit.py
More file actions
32 lines (25 loc) · 936 Bytes
/
DriveBit.py
File metadata and controls
32 lines (25 loc) · 936 Bytes
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
from microbit import *
class DriveBit:
def __init__(self):
pass
class motor:
class one:
def forward(speed):
pin12.write_analog (speed)
pin13.write_analog (0)
def backward(speed):
pin12.write_analog (0)
pin13.write_analog (speed)
def stop():
pin12.write_analog (0)
pin13.write_analog (0)
class two:
def forward(speed):
pin14.write_analog (speed)
pin15.write_analog (0)
def backward(speed):
pin14.write_analog (0)
pin15.write_analog (speed)
def stop():
pin14.write_analog (0)
pin15.write_analog (0)