2020-08-02から1日間の記事一覧

PyQt5 を使って Arduino とシリアル通信

はじめに Arduino側のスイッチが押されたことをPython側で感知しているだけ。 「pyserial」のインストールは不要。 PyQt5==5.15.0 PyQt5-sip==12.8.0 Pythonスクリプト import sys from PyQt5 import QtCore, QtSerialPort from PyQt5.QtWidgets import * fr…

PyQt5 で QLabel のグループ化

list化すれば容易にできた。 import sys from PyQt5 import QtCore from PyQt5.QtWidgets import * from PyQt5.QtGui import QImage, QPixmap ql_x_position = (200, 400, 600, 200, 400, 600, 200, 400, 600) qr_x_position = (1160, 1360, 1560, 1160, 136…