Laser control app¶
The companion app for the firmware, used to control the laser. Built with Qt and pyserial-asyncio. Source code is located in the Firmware App folder of the Elara laser repository.
What is this for?¶
This app is used to control the laser and receive telemetry from the laser. It uses a bidirectional link with the laser microcontroller and a custom open protocol to send and receive data (including power commands, current/voltage data, and temperature/humidity data) between a connected computer and the laser.
Setup¶
Please follow the instructions below to quickly get started with running the app! (The following guide assumes you have already cloned the laser repository, make sure this is done before running any of the commands.)
Poetry-based development¶
We recommend using Poetry for a smooth developer experience. Make sure to install Poetry based on its official installation instructions if you don't have it.
When you run the app for the first time, install the dependencies with the following command (this needs to only be done once):
Then, whenever you want to run/develop the app, simply use the below command:
Traditional Python-based development¶
If you do not want to use Poetry, you can also develop the app with a traditional Python virtual environment:
- Create a virtual env:
python3 -m venv env(this needs to only be done once) - Activate the virtual env with
source env/bin/activate(Mac/Linux) or./env/Scripts/Activate.ps1(Windows Powershell); this must be done every time the app is run: - Install the requirements:
pip install -r requirements.txt(this needs to only be done once) - Run with 'python3 main.py [serial port]'
Resources¶
Here are some helpful resources for working with Python and QML