Desktop application for the Pocket Science Lab (PSlab) open hardware platform.
This repository holds the PSLab Desktop application. It is using ElectronJS running ReactJS on top as UI renderer and uses Python scripts under the hood for device communication. The goal of PSLab is to create an Open Source hardware device (open on all layers) and software applications that can be used for experiments by teachers, students and scientists. Our tiny pocket lab provides an array of instruments for doing science and engineering experiments. It provides functions of numerous measurement tools including an oscilloscope, a waveform generator, a frequency counter, a programmable voltage, current source and even a component to control robots with up to four servos. Our website is at: https://pslab.io
- You can get a Pocket Science Lab device from the FOSSASIA Shop.
- More resellers are listed on the PSLab website.
- Download that latest PSLab Desktop Development Build for Linux.
- Download that latest PSLab Desktop Stable Build for Linux.
Please join us on the following channels:
Feature | Description | Status |
---|---|---|
Home Screen | Show status and version of PSLab device | ✔️ |
Instruments | Exposes PSLab instruments like Oscilloscope, etc | ✔️ |
Oscilloscope | Shows variation of analog signals | ✔️ |
Multimeter | Measures voltage, current, resistance and capacitance | ✔️ |
Logical Analyzer | Captures and displays signals from digital system | ✔️ |
Wave Generator | Generates arbitrary analog and digital waveforms | ✔️ |
Power Source | Generates programmable voltage and currents | ✔️ |
Lux Meter | Measures the ambient light intensity | ❎ |
Barometer | Measures the Pressure | ❎ |
Accelerometer | Measures the acceleration of the device | ❎ |
Gyrometer | Measures the rate of rotation | ❎ |
Compass | Measures the absolute rotation relative to earth magnetic poles | ❎ |
Thermometer | Measures the ambient temperature | ❎ |
Gas Sensor | Detects gases, including NH3, NOx, alcohol, benzene, smoke and CO2 | ❎ |
Robotic Arm Controller | Allows to control 4 servo motors of the robotic arm independently | ✔️ |
The goal of the project is to provide a fully functional science application that works with PSLab and other open scientific hardware. Furthermore the application should be fully compatible and feature matching to the PSLab Android app. Current status of the development:
- Implement all major instruments
- Have an effective build system for linux and windows
- Have a basic data logging feature in place
- Implement interface for I2C sensors
- Implement more minor instruments
- Lux meter
- Gas meter
- Compass
- pH meter
- Accelerometer
- Barometer
- Make data logging and playback more robust
- Code refactoring and architecture improvement
Great you are interested in contributing! Please check the issue tracker for open bugs and feature requests and read the community guidelines of FOSSASIA to start.
- The development branch holds is the standard branch of the project. PRs are merged to this branch and tested on an ongoing basis.
- The master branch holds the stable version of the project and merges the development branch regularly after it is tested thouroughly.
- The install branch holds autogenerated install images for Linux and Windows. It is generated through using a Travis script and created automatically on merged PRs in the dev and master branch.
- The gh-pages is currently outdated, but is intended to hold information of the project from the Readme.md and /docs folder.
The install branch of the PSLab-Desktop repository hosts all the installers that we support for different desktop platforms. You can either install the app directly from the debian .deb package file or windows installer file. "Stable installers" are generated and updated on a weekly basis and are created from the master branch automatically. "Development Installers" are generated and updated on every PR merged on from the development branch. These installers are used for testing purpose.
Download the .deb file from the install branch and click the file to open it using your package manager or use the following commands in your terminal:
sudo dpkg -i <deb-file-name>
Download the windows files from the install branch and execute the file to install the system on your Windows machine.
In the current install branch there is no any dmg file for Mac OS. Therefore it should be built manually.
First you have to setup the development environment. To do it navigate to, How to Setup the Project from Source on Your Development Environment
Now you must build the installation file for Mac OS. To do it navigate to, How to Build for Mac/OSX
After the process navigate to the newly created directory named dist
.
Now open the PSLab-0.1.0.dmg
file.
Drag and drop the PSLab
icon to the Application
directory within the installation window.
Now the PSLab will appear in the Launchpad
.
- Fork the project to get a copy of the repository in your github profile.
- Clone the copied project from your profile ( Not the original repository from FOSSASIA ).
cd
into your project folder.git remote add upstream https://github.com/fossasia/pslab-desktop.git
This command will set up the upsteam link.
Installing development dependencies
While in your project folder
npm install
This command will install all the necessary dependencies required by the electron app to run. As this app uses the PSL library under the hood for device communication, you'll have to install it as well. The instructions to install it are provided here. After installation of PSL make sure you can property import it in Python3. Run the following command in your bash shell.
python3
>>> from PSL import sciencelab
If this command runs without throwing an error, then you are good to go.
Starting the app
All commands to start and debug the app are outlined in the package.json. To simply get it running run the following command while in your project repository.
npm start
And wait for the electron shell to open.
We are generating production builds automatically in the install branch of the project. The build pipeline generates a debian file that can be installed on any debian based distro. A .win file is generated as well. You can also build the files yourself.
Add local mirror will make the dependencies downloading much faster: If you are in China, please run the following line in GNU/Linux shell. For more local npm package mirror information, please visit the following link: https://www.npmjs.com/package/mirror-config-china
echo 'registry = http://registry.npm.taobao.org/' >> ~/.npmrc
While in the project root
npm run build-linux
While in the project root
npm run build-windows
This command will produce a build and a dist directory inside the project folder. The build folder contains the optimized react files, while the dist folder contains the final electron installers.
While in the project root
npm run build-mac
This command will produce a build and a dist directory inside the project folder. The build folder contains the optimized react files, while the dist folder contains the final electron installers.
While in the project root
npm run build
This project is Free and Open Source software. The project us licensed under the GPL v3. Copyright is owned by FOSSASIA. More details in the license files.
The project is maintained by
- Padmal (@CloudyPadmal)
- Mario Behling (@mariobehling)
- Wei Tat (@cweitat)
- Aakash Mallik (@AakashMallik)