-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.kv
66 lines (58 loc) · 1.45 KB
/
main.kv
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<MainScreen>:
name: 'main'
FloatLayout:
size_hint: None, None
DPEAButton:
id: motor
text: 'Run Motor'
size: 100, 100
x: root.width * 0.75
y: root.height * 0.5
color: 0, 1, 0, 1
on_press: root.pressed()
DPEAButton:
id: direction
text: "Change Direction"
size: 100, 100
x: root.width * 0.25
y:root.height * 0.5
color: 1, 0, 0, 1
on_press: root.direction()
Slider:
size_hint: .75, None
id: slider
min: 50
max: 500
value: 275
background_width: 100
step: 1
x: root.width *.05
y: root.height * .3
Label:
text: "Speed: " + str(int(slider.value))
font_size: 30
x: root.width * -.2
y: root.height *-.2
color: 1,0,1,1
ImageButton:
id: logo_image_button
source: "../../pidev/kivy/images/DPEALogoTransparent.png"
size: 100, 100
x: root.width * 0.5
y: root.height * 0.5
on_press: root.motor_thread()
Label:
id: updates
text: "Gets position of motor when DPEA button pressed"
font_size: 30
x: root.width *.05
y: root.height *.2
color: 1,0,1,1
DPEAButton:
id: flip
text: 'Flip'
size: 100, 100
x: root.width * 0.75
y: root.height * 0.75
color: 0, 0, 1, 1
on_press: root.flip()