Page 114 - MDP2020-2
P. 114
| 인천전자마이스터고등학교 ·············································································································
108
GPIO.setwarnings(False)
GPIO.setup(led, GPIO.OUT)
GPIO.setup(fan, GPIO.OUT)
fan_p=GPIO.PWM(fan,100)
fan_p.start(0)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.showFullScreen()
MainWindow.resize(1920, 1080)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.background = QtWidgets.QLabel(self.centralwidget)
self.background.setGeometry(QtCore.QRect(0, 0, 1920, 1080))
self.background.setMinimumSize(QtCore.QSize(1920, 1080))
self.background.setMaximumSize(QtCore.QSize(1920, 1080))
self.background.setObjectName("background")
self.movie = QMovie("/home/pi/Desktop/BG1.gif")
self.background.setMovie(self.movie)
self.movie.start()
self.button_led = QtWidgets.QPushButton(self.centralwidget)
self.button_led.setGeometry(QtCore.QRect(990, 480, 151, 141))
font = QtGui.QFont()
font.setFamily("Arial")
font.setPointSize(24)
font.setBold(True)
font.setWeight(75)
self.button_led.setFont(font)
self.button_led.setObjectName("button_led")
self.button_led.setStyleSheet('image:url(/home/pi/Desktop/UV_OFF.png); border:0px')
self.button_led.toggled.connect(self.led)
self.button_led.setCheckable(True)
self.button_total = QtWidgets.QPushButton(self.centralwidget)
self.button_total.setGeometry(QtCore.QRect(1766, 15, 121, 111))
self.button_total.setCheckable(True)
self.button_total.toggled.connect(self.slot_toggle)
font = QtGui.QFont()
font.setFamily("Arial")
font.setPointSize(48)
font.setBold(True)