• Stars
    star
    1,770
  • Rank 25,239 (Top 0.6 %)
  • Language
    JavaScript
  • License
    GNU General Publi...
  • Created almost 8 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PSLab Desktop Application https://pslab.io

PSLab Desktop

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

Development Build Status Codacy Badge Mailing List Gitter Twitter Follow

This repository holds the PSLab Desktop application. It is using ElectronJS running React 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 PSLab.io. See also the screenshots and demos.

PSLab Banner

Buy

Communication

Please join us on the following channels:

Downloads and Distribution

We are providing binary packages. Please see the releases page for downloads.

Python library

As this app uses the PSL library under the hood for device communication, you need to have it installed as well. Instructions are provided in the pslab-python repository.

As of now, you need to have the latest version installed.

Arch Linux

If you are running Arch Linux or another distribution based on it, install pslab-desktop.

Other Linux distributions

There are packages in .deb format (Debian, Ubuntu and derivatives), .rpm (Fedora, openSUSE etc), and .tar.xz archives.

Windows

There are installers as .exe executables, based on NSIS.

If you are using Chocolatey, you can install the app via:

choco install pslab-desktop

The package is available at https://community.chocolatey.org/packages/pslab-desktop and currently maintained at https://github.com/tunisiano187/Chocolatey-packages.

macOS

There are .dmg image files and .zip archives.

Open the PSLab-*.dmg file, drag and drop the PSLab icon to the Application directory within the installation window, and PSLab will appear in your Launchpad.

Development

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 FOSSASIA community guidelines to get started.

Branch Policy

  • The development branch is the standard branch of the project. Pull requests are merged to this branch and tests run through Travis CI.
  • The master branch is currently not maintained and held the stable releases of the project and merged the development branch regularly after it was tested thouroughly.
  • The install branch is outdated and holds autogenerated install images for some Linux distributions and Windows. It was generated through Travis CI on merged pull requests in the development and master branches.
  • The gh-pages is currently outdated, but is intended to hold information of the project from the Readme.md and /docs folder.

Setting up a Development Environment

  1. Fork the project to get a copy of the repository in your GitHub profile.
  2. Clone the forked project from your profile (not from FOSSASIA): git clone [email protected]:your-profile/pslab-desktop
  3. Change into the project folder: cd pslab-desktop
  4. Add the original FOSSASIA repository as a remote: git remote add upstream https://github.com/fossasia/pslab-desktop.git

Prerequisites and Dependencies

Please note: If you are in China, you need to configure a mirror for npm. In short, add the following to your ~/.npmrc file (create it if it doesn't yet exist):

registry = http://registry.npm.taobao.org/

While in your project folder, run npm install. This will install all the necessary dependencies required by the app to run.

Using a virtual enviroment

To isolate the Python dependencies, it is recommended to use a virtual enviroment for development. To create a virtual enviroment, run the following command while in your project repository:

python3 -m venv venv

Now activate the virtual enviroment in your current shell session:

# For bash/zsh users:
source ./venv/bin/activate
# For Windows cmd.exe users:
.\venv\Scripts\activate.bat

(If you use a different shell, check the Python venv docs for the full list.)

Within your virtual enviroment, now install the Python library:

python3 -m pip install pslab

With the virtual enviroment activated, the app will run using the libraries installed in the virtual enviroment, and not the global Python location.

To deactivate the virtual enviroment, run:

deactivate

If you are also working on the Python library, set PYTHON_PATH to point to its directory in order to have your local version available to the desktop app.

Starting the app

All commands to start and debug the app are outlined in the package.json file. To simply get it running run the following command while in your project repository and the virtual enviroment is active.

npm start

And wait for Electron to open.

IPC and Stack

The stack comprises multiple pieces:

  • pslab-hardware, offering phyiscal ports
  • pslab-firmware, running on the PIC MCU
  • pslab-python, a Python library that communicates with the MCU via USB serial
  • the bridge here in scripts/, which talks to the Python library
  • the Electron app itself, which offers the GUI and communicates with the bridge via stdin/stdout

Electron builds on top of Node.js and Chromium. The UI is running in its own rendering process, requiring IPC in order to communicate with the main process. See public/electron.js for the entry point in this project.

To communicate with the Python bridge, there are extra Electron processes that spawn Python processes. See background_tasks/.

Any action from the UI thus requires the following:

  • an appropriate handler to pick up the action from the UI element
  • a function invoking the corresponding IPC method
  • an Electron-side IPC method definition (public/electron.js)
  • a Python-side IPC method definition (scripts/bridge.py)

Building the App

First you need to follow the instructions to set up a development environment.

While in the project root, run the build scripts as defined in package.json:

npm run build
npm run build:electron

For a platform-specific build, run the following instead, where PLATFORM can be any of linux, mac, or win:

npm run build
npm run build:electron -- --$PLATFORM

If you do not want to create an archive or package:

npm run build
npm run pack

This will produce two directories in the project root. The build/ directory contains the optimized React files, while the dist/ directory contains the final Electron build with everything else.

License

This project is Free and Open Source software. The project is licensed under the GPL v3. Copyright is owned by FOSSASIA. More details in the license files.

Maintainers

The project is maintained by

More Repositories

1

visdom

A flexible tool for creating, organizing, and sharing visualizations of live, rich data. Supports Torch and Numpy.
Python
9,894
star
2

open-event-server

The Open Event Organizer Server to Manage Events https://test-api.eventyay.com
Python
2,906
star
3

phimpme-android

Phimp.me Photo Imaging and Picture Editor https://play.google.com/store/apps/details?id=org.fossasia.phimpme
Java
2,580
star
4

susi_server

SUSI.AI server backend - the Artificial Intelligence server for personal assistants https://susi.ai
Java
2,500
star
5

susi_android

SUSI.AI Android App https://play.google.com/apps/testing/ai.susi
Kotlin
2,418
star
6

open-event-frontend

The frontend for the Open Event API Server https://test.eventyay.com
JavaScript
2,313
star
7

open-event-droidgen

Open Event Android App Generator https://github.com/fossasia/open-event-android/raw/apk/sample-apk-fossasia17-development.apk
Java
2,048
star
8

pslab-android

PSLab Android App https://play.google.com/store/apps/details?id=io.pslab
Java
2,038
star
9

susi.ai

SUSI.AI Web Client https://susi.ai
JavaScript
2,026
star
10

open-event-wsgen

Open Event Website App Generator https://sched.eventyay.com
JavaScript
2,013
star
11

open-event-attendee-android

Open Event Attendee Android General App https://github.com/fossasia/open-event-android/blob/apk/open-event-dev-app-playStore-debug.apk
Kotlin
1,947
star
12

star-me

Star FOSSASIA Repositories on Github and Support the Community
JavaScript
1,906
star
13

fossasia.org

FOSSASIA Website https://fossasia.org
Less
1,883
star
14

susi_iOS

SUSI AI iOS app http://susi.ai
Swift
1,870
star
15

loklak_search

Frontend Search for loklak server https://loklak.org
TypeScript
1,840
star
16

open-event-organizer-android

Open Event Mobile App for Organizers and Entry Managers https://play.google.com/store/apps/details?id=com.eventyay.organizer
Java
1,793
star
17

badgeyay

Attendee Badge Generator for Conferences
JavaScript
1,791
star
18

badge-magic-android

Badge Magic with LEDs - Android App https://play.google.com/apps/testing/org.fossasia.badgemagic
Kotlin
1,788
star
19

meilix

Beautiful Linux System https://meilix.org | APT Repo: http://meilix.fossasia.org
Python
1,779
star
20

susper.com

Susper Decentralised Search Engine https://susper.com
TypeScript
1,742
star
21

neurolab-android

NeuroLab Android https://github.com/fossasia/neurolab-android/raw/apk/neurolab-dev-debug.apk
Java
1,710
star
22

open-event

Open Event Project, Samples, Documentation and Artwork http://open-event-dev.herokuapp.com
Python
1,701
star
23

labs.fossasia.org

Projects Website for FOSSASIA http://labs.fossasia.org
CSS
1,669
star
24

query-server

Query Server Search Engines
Python
1,665
star
25

gci16.fossasia.org

FOSSASIA Google Code-In Website 2016/17 http://gci16.fossasia.org
HTML
1,659
star
26

codeheat.org

Codeheat Coding Contest Website https://codeheat.org
Less
1,639
star
27

pslab-hardware

PSLab Hardware Design and Schematics https://pslab.io
Prolog
1,633
star
28

pslab-python

Python Library for PSLab Desktop: https://pslab.io
Python
1,632
star
29

flappy-svg

Flappy Bird in SVG. Play it at http://fossasia.github.io/flappy-svg/
JavaScript
1,613
star
30

susi_linux

Hardware for SUSI AI https://susi.ai
Python
1,609
star
31

pslab-scripts

Pocket Science Lab - Scripts for Sensor Experiments
Python
1,604
star
32

gci17.fossasia.org

FOSSASIA Google Code-In Website 2017/18 https://gci17.fossasia.org
CSS
1,598
star
33

gci15.fossasia.org

FOSSASIA Google Code-In Website 2015/16 http://gci15.fossasia.org
HTML
1,596
star
34

susi_skill_cms

A web application framework to edit susi skills http://skills.susi.ai
JavaScript
1,583
star
35

2017.fossasia.org

FOSSASIA Summit 2017 https://2017.fossasia.org
HTML
1,580
star
36

2018.fossasia.org

FOSSASIA Summit 2018 https://2018.fossasia.org
HTML
1,577
star
37

fossasia-communities

FOSSASIA API Files of Communities in Asia
1,576
star
38

open-event-attendee-ios

iOS app for open event
Swift
1,570
star
39

gci14.fossasia.org

FOSSASIA Google Code-In Website 2014/15 http://gci14.fossasia.org
JavaScript
1,569
star
40

knittingpattern

A Python Library for Knitting Patterns
Python
1,569
star
41

2016.fossasia.org

FOSSASIA Summit 2016 https://2016.fossasia.org
CSS
1,564
star
42

2012.fossasia.org

FOSSASIA Summit 2012 Event Site https://2012.fossasia.org
CSS
1,563
star
43

pslab-firmware

Firmware for PSLab Open Hardware Platform https://pslab.io
C
1,559
star
44

loklak_webclient

loklak web application
JavaScript
1,553
star
45

loklak_wok_android

"loklak wok" is a harvesting peer for the loklak_server https://github.com/fossasia/loklak_wok_android/raw/apk/loklak_wok_1.2_20160201.apk
Java
1,549
star
46

susi_chromebot

SUSI.AI Chrome Extension
JavaScript
1,548
star
47

directory.api.fossasia.net

Python
1,547
star
48

yaydoc

Docs! Yay! http://yaydoc.org
JavaScript
1,546
star
49

x-mario

x-mario, the gaming distro
Shell
1,542
star
50

searss

Search to RSS tool
Python
1,542
star
51

neurolab-hardware

Neurolab Hardware
1,541
star
52

2015.fossasia.org

FOSSASIA Summit 2015 Event Site https://2015.fossasia.org
CSS
1,539
star
53

meilix-systemlock

Meilix system lock
Python
1,537
star
54

meilix-generator

WebApp for generating a custom ISO image based on Meilix http://meilix.org
HTML
1,537
star
55

2014.fossasia.org

FOSSASIA Summit 2014 Event Site http://2014.fossasia.org
HTML
1,537
star
56

phimpme-drupal

Phimp.me - Photo App on Drupal
PHP
1,534
star
57

knitlib

Knitting backend library for knitting machines
Python
1,532
star
58

labyrinth

FOSSASIA Labyrinth
JavaScript
1,532
star
59

yaydoc-artwork

Open Source Books
1,532
star
60

sg18.sciencehack.asia

UNESCO Hackathon Website at the FOSSASIA Summit Singapore https://sg18.sciencehack.asia
CSS
1,532
star
61

phimpme-wordpress

Phimp.me - Photo App on Wordpress
PHP
1,532
star
62

CommonsNet

Sharing and Transparency for WiFi Networks
JavaScript
1,531
star
63

knitweb

knitting web app frontend and backend
JavaScript
1,530
star
64

pslab-case

PSLab Case https://pslab.io
1,530
star
65

fossasia.net

FOSSASIA.net Website https://fossasia.net
HTML
1,530
star
66

2011.fossasia.org

FOSSASIA Summit 2011 Event Site http://2011.fossasia.org
HTML
1,530
star
67

unesco.sciencehack.asia

UNESCO Hackathon Website https://unesco.sciencehack.asia
CSS
1,530
star
68

pslab-expeyes

PSLab for ExpEYES - Science Experiments and Data Acquisition for Physics Education https://pslab.io
Python
1,529
star
69

susi_tweetbot

Twitter Bot for Susi http://susi.ai
JavaScript
1,529
star
70

api.fossasia.net

FOSSASIA API
JavaScript
1,529
star
71

fossasia-nodemailer

JavaScript
1,529
star
72

xmario_buildscript

x-mario build script
Shell
1,529
star
73

2023.fossasia.org

HTML
1,528
star
74

hotelxoai.com

The Open Source Hotel in the Mekong Delta in Vietnam
HTML
1,527
star
75

2010.fossasia.org

FOSSASIA Summit 2010 Event Site http://2010.fossasia.org
HTML
1,527
star
76

susi_smart_box

SUSI.AI Smart Box https://susi.ai
1,526
star
77

blog.fossasia.org

Issue Tracker for https://blog.fossasia.org
1,526
star
78

fossasia11-drupal

FOSSASIA 2011 Drupal Site
PHP
1,526
star
79

open-event-next

Open Event Frontend "Next Version" with Vue.js
TypeScript
1,525
star
80

perspektive89.com

Open Source Journal Perspektive89.com
1,525
star
81

fossasia10-drupal

FOSSASIA 2010 Drupal Site
PHP
1,525
star
82

pslab-test-jig

PSLab Test Jig - Boards to test PSLab hardware https://pslab.io
1,523
star
83

cmap.api.fossasia.net

FOSSASIA Community Map
JavaScript
1,523
star
84

fossasia.github.io

FOSSASIA.GitHub.io
HTML
1,523
star
85

feed.api.fossasia.net

PHP
1,522
star
86

loklak-webtweets

FOSSASIA Tweets with loklak http://fossasia.github.io/loklak-webtweets/
Less
1,522
star
87

foss.vn

FOSS.vn Website http://foss.vn
HTML
1,522
star
88

susi_skill_data

A storage place for SUSI.AI skills https://susi.ai
1,521
star
89

susi_fbbot

Susi Facebook Bot http://susi.ai
JavaScript
1,519
star
90

knitpat

Knitting Pattern Format
Python
1,518
star
91

jugaadfest.com

Jugaadfest in India https://jugaadfest.com
HTML
1,518
star
92

susi_desktop

Desktop Client for http://api.susi.ai
JavaScript
1,517
star
93

loklak_wp_plugins

PHP
1,517
star
94

susi_telegrambot

Susi Telegram Bot http://susi.ai
JavaScript
1,516
star
95

susi_slackbot

Ask Susi Messengers http://susi.ai
JavaScript
1,516
star
96

open-event-scraper

Google spreadsheet parsing for Open Event JSON
Python
1,516
star
97

event-collect

event website listing to Open Event format scraper and converter
Python
1,516
star
98

knitserver

JavaScript
1,515
star
99

accounts.susi.ai

Accounts Service for SUSI.AI http://accounts.susi.ai
JavaScript
1,514
star
100

loklak_tweetheatmap

Heat map with tweets by search query using Loklak API and OpenLayers 3
JavaScript
1,513
star