Skip to content

jatin2003/pslab-desktop

 
 

Repository files navigation

PSLab Desktop

Desktop application for the Pocket Science Lab (PSlab) open hardware platform.

Development Build Status Master Build Status Codacy Badge Mailing List Gitter Twitter Follow

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

PSLab Banner

Buy

Download Installer

Communication

Please join us on the following channels:

Screenshots


The home screen that showcases all our instruments.

A four channel oscilloscope with analysis features.

A four channel Logic Analyzer for digital outputs.

A full fledged multimeter that can measure voltage, frequency, resistance etc.

Instrument used to generate analoge and digital waves of different frequencies, phase and duty cycles.

A programmable voltage and current source to drive your external circuits.

An intutive interface to control 4 servo motor robot arm.

Save data and config in CSV and retrieve them back later.

The app drawer gives you access to many more options like the FAQ, Device Information Screen etc.

A settings page for configuring your app as per your requirement.

A device information screen that shows device information and guide to connect it to the app.

A new FAQ screen that covers all generic as well as app specific questions that a user may have.

A page that has all the important links that can be used to reach out to us, or contribute to the project.

Project Videos

Project Overview

Features and Implementation Status

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 ✔️

Roadmap

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

How to Contribute

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.

Branch Policy

  • 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.

How to Install

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.

How to Install on Linux

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>

How to Install on Windows

Download the windows files from the install branch and execute the file to install the system on your Windows machine.

How to Setup the Project from Source on Your Development Environment

  1. Fork the project to get a copy of the repository in your github profile.
  2. Clone the copied project from your profile ( Not the original repository from FOSSASIA ).
  3. cd into your project folder.
  4. 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.

Creating Production Builds

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.

How to Build for Linux (Debian based OS)

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

How to Build for Windows

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.

How to Build for Mac / OSX

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.

How to Build for Other Platforms

While in the project root

npm run build

License

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.

Maintainers

The project is maintained by

Packages

No packages published

Languages

  • JavaScript 86.0%
  • Python 12.3%
  • HTML 1.4%
  • Other 0.3%