-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCalibrateXL5.py
45 lines (32 loc) · 1.12 KB
/
CalibrateXL5.py
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
import time
from tkinter import *
import VescPy
win = Tk()
master = Frame(win)
Arduino = VescPy.VESC()
def neutral():
Arduino.setThrottle(1500)
#Arduino.update()
def fullAcceleration():
Arduino.setThrottle(2000)
#Arduino.update()
def fullReverse():
Arduino.setThrottle(0)
#Arduino.update()
# TODO: Find if this can be implemented without uneccessary functions.
reverseButton = Button(master, text="Reverse", command=fullReverse)
neutralButton = Button(master, text="Neutral", command=neutral)
accelerationButton = Button(master, text="Full Throttle", command=fullAcceleration)
reverseButton.pack(side=LEFT,padx=10)
neutralButton.pack(side=LEFT,padx=10)
accelerationButton.pack(side=LEFT,padx=10)
l = Label(win, text="Calibration for the ESC")
l2 = Label(win, text="Make sure low voltage mode is disabled and unplug and plug back in the battery")
l3 = Label(win, text="Press Neutral and Press button on ESC until turns it red and release")
l4 = Label(win, text="Once you see a red blink go to full throttle, then once two red go to full reverse")
l.pack()
l2.pack()
l3.pack()
l4.pack()
master.pack()
mainloop()