summaryrefslogtreecommitdiff
path: root/qt/RGBController/old_src/serial_communication.h
diff options
context:
space:
mode:
Diffstat (limited to 'qt/RGBController/old_src/serial_communication.h')
-rw-r--r--qt/RGBController/old_src/serial_communication.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/qt/RGBController/old_src/serial_communication.h b/qt/RGBController/old_src/serial_communication.h
new file mode 100644
index 0000000..5f2826c
--- /dev/null
+++ b/qt/RGBController/old_src/serial_communication.h
@@ -0,0 +1,27 @@
+#ifndef SERIAL_COMMUNICATION_H
+#define SERIAL_COMMUNICATION_H
+
+/* includes */
+#include <QSerialPort>
+#include <QSerialPortInfo>
+#include <QDebug>
+
+
+class serial_communication
+{
+ public:
+ /* function declares */
+ serial_communication();
+ bool serial_connect(QString port);
+ bool serial_disconnect();
+ void rgb_change(int r, int g, int b);
+ void send(QString com);
+ /* variables */
+ QString port_name;
+ QSerialPort serial;
+ QByteArray data;
+ private slots:
+ void read();
+};
+
+#endif // SERIAL_COMMUNICATION_H