Skip to content

VRB95/PyQt2Arduino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

PyQt2Arduino

HitCount License: MIT

PyQt2Arduino is mainly a terminal for serial comunication with Arduino, but it has a set of custom tabs for different functions, like displaying a text send from graphical user interface to an 16x2 lcd connected to Arduino, or displaying the temperature or ligh intensity recived from external sesnors. The application is writen in python and PyQt5 (gui part and also for serial communication it use QSerialPort) and can be easly modified for adapting it to a large variety of sensors, extra tab can be add in GUI and other functions can be create.

Table of Contents

Built With:

Prerequisites

I'll asume you already have installed python 3.x, now install PyQt5 packages:

  • via pip
pip3 install PyQt5
  • via apt-get (Ubuntu)
sudo apt-get install qtcreator pyqt5-dev-tools

Setup/Installation:

  1. Clone the repo:
git clone https://github.com/Vesa95/PyQt2Arduino.git
  1. Upload to Arduino any example you want from Arduino2PyQt folder, but for the first steps with this application I highly recommand to upload "Send_Recive.ini" example first. With this code you send data (text) from PyQt2Arduino graphical user interface to Arduino, and Arduino will print on console (monitor) what it recived.
  2. After you uploaded any example on Arduino, run PyQt2Arduino.py:
python3 PyQt2Arduino.py

Usage

In this part, I'll show you how to work with this application and with every example from Arduino2PyQt folder.

  1. Send_Recive;
  2. Display_Text;
  3. Recive_Light_Intensity;
  4. Recive_Temperature;
  5. Sonar;
  6. All_In_One;

Graphical User Interface

The GUI consists of 5 tabs: 2 main tabs and 4 custom tabs. Every tab consists of other widgets.

  1. Connect tab:
    • From here you can select all the settings for serial communication, such as PORT, BAUDRATE, DATABITS, PARTIY, and STOPBITS.
    • The default setting are: Baudrate: 9600, Databits: 8, StopBits: 1, Parity: NoParity, and only port need to be selected.

screenshot_1

  1. Console tab:
    • This is the "Serial Monitor", from here you can send data to Arduino via "Send widget" and display in "Read widget" what Arduino send back to you.
    • Also, any data sended or recived will be saved in logfile.

screenshot_1

Arduino2PyQt Examples

For almost every Arduino2PyQt example you need a specific library, I have already downloaded the libraries and put them in folders of the examples, or you cand download them from original source:

I. Send_Recive:

  1. Upload Send_Recive.ini
  2. Open PyQt2Arduino and check "Use Default Settings"
  3. Go in Console tab and in "Send widget" write any text you want to send to Arduino, click Send button, and Arduino will send back to PyQt2Arduino, who will print it on "Read widget".

II. Display_Text

Parts List:
  1. Arduino UNO
  2. LCM 1602 IIC
  3. LCD 16x2
Circuit Diagram

screenshot_1

Application Usage
  1. Install the library
  2. Upload Display_Text.ini
  3. Open PyQt2Arduino and check "Use Default Settings"
  4. Go to Display tab
  5. Click on Connect button
  6. Type whatever you want to be displayed on 16x2 lcd and click Send

screenshot_1

III. Recive_Light_Intensity

Parts List:
  1. Arduino UNO
  2. TSL2561
Circuit Diagram

screenshot_1

Application Usage
  1. Install the library
  2. Upload Recive_Light_Intensity.ini
  3. Open PyQt2Arduino and check "Use Default Settings"
  4. Go to Light S. tab
  5. Click on Start Reading button

screenshot_1

IV. Recive_Temperature

Parts List:
  1. Arduino UNO
  2. DTH11
Circuit Diagram

screenshot_1

Application Usage
  1. Install the library
  2. Upload Recive_Temperature.ini
  3. Open PyQt2Arduino and check "Use Default Settings"
  4. Go to Temperature. tab
  5. Click on Start Reading button

screenshot_1

V. Sonar

Parts List:
  1. Arduino UNO
  2. HC-SR04
Circuit Diagram

screenshot_1

Application Usage
  1. Install the library
  2. Upload Sonar.ini
  3. Open PyQt2Arduino and check "Use Default Settings"
  4. Go to Ultrasonic S. tab
  5. Click on Start Reading button

screenshot_1

VI. All_In_One

Parts List:
  1. Arduino UNO
  2. LCM 1602 IIC
  3. LCD 16x2
  4. TSL2561
  5. DTH11
  6. HC-SR04
Circuit Diagram

screenshot_1

Application Usage
  1. Install all the libraries
  2. Upload All_In_One.ini
  3. Open PyQt2Arduino and check "Use Default Settings"
  4. Enjoy!

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature)
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Vesa Bogdan - vesabogdan95@gmail.com

Project Link: https://github.com/vesa95/PyQt2Arduino

About

PyQt2Arduino is mainly a terminal for serial comunication with Arduino, but it has a set of custom tabs for different functions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages