# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'queuebot.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again.  Do not edit this file unless you know what you are doing.


from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
    def startclick(self):
        from boltiot import Bolt
        api_key = "91a27806-4174-4001-9d24-b42a37a3a513"
        device_id  = "BOLT5778783"
        mybolt = Bolt(api_key, device_id)
        response=mybolt.serialBegin("9600")
        print(response)
    def LFclick(self):
        from boltiot import Bolt
        api_key = "91a27806-4174-4001-9d24-b42a37a3a513"
        device_id  = "BOLT5778783"
        mybolt = Bolt(api_key, device_id)
        response=mybolt.serialWrite("LF")
        print(response)
    def forwardclick(self):
        from boltiot import Bolt
        api_key = "91a27806-4174-4001-9d24-b42a37a3a513"
        device_id  = "BOLT5778783"
        mybolt = Bolt(api_key, device_id)
        response=mybolt.serialWrite("F")
        print(response)
    def RFclick(self):
        from boltiot import Bolt
        api_key = "91a27806-4174-4001-9d24-b42a37a3a513"
        device_id  = "BOLT5778783"
        mybolt = Bolt(api_key, device_id)
        response=mybolt.serialWrite("RF")
        print(response)
    def Lclick(self):
        from boltiot import Bolt
        api_key = "91a27806-4174-4001-9d24-b42a37a3a513"
        device_id  = "BOLT5778783"
        mybolt = Bolt(api_key, device_id)
        response=mybolt.serialWrite("L")
        print(response)
    def STclick(self):
        from boltiot import Bolt
        api_key = "91a27806-4174-4001-9d24-b42a37a3a513"
        device_id  = "BOLT5778783"
        mybolt = Bolt(api_key, device_id)
        response=mybolt.serialWrite("S")
        print(response)
    def RIclick(self):
        from boltiot import Bolt
        api_key = "91a27806-4174-4001-9d24-b42a37a3a513"
        device_id  = "BOLT5778783"
        mybolt = Bolt(api_key, device_id)
        response=mybolt.serialWrite("R")
        print(response)
    def LBclick(self):
        from boltiot import Bolt
        api_key = "91a27806-4174-4001-9d24-b42a37a3a513"
        device_id  = "BOLT5778783"
        mybolt = Bolt(api_key, device_id)
        response=mybolt.serialWrite("LB")
        print(response)
    def BAclick(self):
        from boltiot import Bolt
        api_key = "91a27806-4174-4001-9d24-b42a37a3a513"
        device_id  = "BOLT5778783"
        mybolt = Bolt(api_key, device_id)
        response=mybolt.serialWrite("B")
        print(response)
    def RBclick(self):
        from boltiot import Bolt
        api_key = "91a27806-4174-4001-9d24-b42a37a3a513"
        device_id  = "BOLT5778783"
        mybolt = Bolt(api_key, device_id)
        response=mybolt.serialWrite("RB")
        print(response)
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(917, 1134)
        self.layoutWidget = QtWidgets.QWidget(Dialog)
        self.layoutWidget.setGeometry(QtCore.QRect(11, 105, 891, 981))
        self.layoutWidget.setObjectName("layoutWidget")
        self.gridLayout = QtWidgets.QGridLayout(self.layoutWidget)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setObjectName("gridLayout")
        self.start = QtWidgets.QPushButton(self.layoutWidget)
        self.start.setObjectName("start")
        self.gridLayout.addWidget(self.start, 0, 1, 1, 1)
        self.LF = QtWidgets.QPushButton(self.layoutWidget)
        self.LF.setObjectName("LF")
        self.gridLayout.addWidget(self.LF, 1, 0, 1, 1)
        self.forward = QtWidgets.QPushButton(self.layoutWidget)
        self.forward.setObjectName("forward")
        self.gridLayout.addWidget(self.forward, 1, 1, 1, 1)
        self.RF = QtWidgets.QPushButton(self.layoutWidget)
        self.RF.setObjectName("RF")
        self.gridLayout.addWidget(self.RF, 1, 2, 1, 1)
        self.L = QtWidgets.QPushButton(self.layoutWidget)
        self.L.setObjectName("L")
        self.gridLayout.addWidget(self.L, 2, 0, 1, 1)
        self.ST = QtWidgets.QPushButton(self.layoutWidget)
        self.ST.setObjectName("ST")
        self.gridLayout.addWidget(self.ST, 2, 1, 1, 1)
        self.RI = QtWidgets.QPushButton(self.layoutWidget)
        self.RI.setObjectName("RI")
        self.gridLayout.addWidget(self.RI, 2, 2, 1, 1)
        self.LB = QtWidgets.QPushButton(self.layoutWidget)
        self.LB.setObjectName("LB")
        self.gridLayout.addWidget(self.LB, 3, 0, 1, 1)
        self.BA = QtWidgets.QPushButton(self.layoutWidget)
        self.BA.setObjectName("BA")
        self.gridLayout.addWidget(self.BA, 3, 1, 1, 1)
        self.RB = QtWidgets.QPushButton(self.layoutWidget)
        self.RB.setObjectName("RB")
        self.gridLayout.addWidget(self.RB, 3, 2, 1, 1)

        self.retranslateUi(Dialog)
        self.start.clicked.connect(self.startclick)
        self.LF.clicked.connect(self.LFclick)
        self.forward.clicked.connect(self.forwardclick)
        self.RF.clicked.connect(self.RFclick)
        self.L.clicked.connect(self.Lclick)
        self.ST.clicked.connect(self.STclick)
        self.RI.clicked.connect(self.RIclick)
        self.LB.clicked.connect(self.LBclick)
        self.BA.clicked.connect(self.BAclick)
        self.RB.clicked.connect(self.RBclick)
        QtCore.QMetaObject.connectSlotsByName(Dialog)

    def retranslateUi(self, Dialog):
        _translate = QtCore.QCoreApplication.translate
        Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
        self.start.setText(_translate("Dialog", "start"))
        self.LF.setText(_translate("Dialog", "LFORWARD"))
        self.forward.setText(_translate("Dialog", "FORWARD "))
        self.RF.setText(_translate("Dialog", "RFORWARD"))
        self.L.setText(_translate("Dialog", "LEFT"))
        self.ST.setText(_translate("Dialog", "STOP"))
        self.RI.setText(_translate("Dialog", "RIGHT"))
        self.LB.setText(_translate("Dialog", "LBACKWARD"))
        self.BA.setText(_translate("Dialog", "BACKWARD"))
        self.RB.setText(_translate("Dialog", "RBACKWARD"))


if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    Dialog = QtWidgets.QDialog()
    ui = Ui_Dialog()
    ui.setupUi(Dialog)
    Dialog.show()
    sys.exit(app.exec_())
