You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository hosts the python library for communicating with PSLab. This can be installed on a linux pc/raspberry pi. With this, one can communicate with the hardware using simple python code.
11
+
This repository hosts the python library for communicating with the Pocket Science Lab open hardware platform (PSLab). This can be installed on a Linux or Windows system. Using this library you can communicate with the PSLab using simple Python code. The Python library is also used in the PSLab desktop application as a backend component. 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. The website is at: https://pslab.io
12
12
13
-
The goal of PSLab is to create an Open Source hardware device (open on all layers) that can be used for experiments by teachers, students and citizen scientists. Our tiny pocket lab provides an array of sensors for doing science and engineering experiments. It provides functions of numerous measurement devices including an oscilloscope, a waveform generator, a frequency counter, a programmable voltage, current source and as a data logger. Our website is at: https://pslab.io
To install PSLab on Debian based GNU/Linux system, the following dependencies must be installed.
24
22
25
-
####Dependencies
23
+
### Dependencies
26
24
27
25
* Python 3.4 or higher [Link to Official download page](https://www.python.org/downloads/windows/)
28
26
* Pip **Support package installer**
@@ -33,29 +31,27 @@ To install PSLab on Debian based GNU/Linux system, the following dependencies mu
33
31
**Note**
34
32
*If user is only interested in using PSLab as an acquisition device without a display/GUI, only one repository [pslab-python](https://github.com/fossasia/pslab-python) needs to be installed. If you like a GUI, try installing [pslab-desktop](https://github.com/fossasia/pslab-desktop) following the instructions provided in that repository Readme file*
35
33
34
+
### How To Install on Linux
36
35
37
-
##### To install, cd into the directories
36
+
cd into the directories
38
37
39
38
$ cd <SOURCE_DIR>
40
39
41
40
and run the following
42
41
43
42
$ sudo make clean
44
-
43
+
45
44
$ sudo make
46
-
45
+
47
46
$ sudo make install
48
47
49
48
Now you are ready with the PSLab software on your machine :)
50
49
50
+
### How to Install on Windows
51
51
52
-
#### Windows
53
-
54
-
##### Instructions
55
-
56
-
Step 1: Install the latest Python version on your computer and configure `PATH` variable to have both Python installation directory and the Scripts directory to access `pip` tools.
52
+
**Step 1**: Install the latest Python version on your computer and configure `PATH` variable to have both Python installation directory and the Scripts directory to access `pip` tools.
57
53
58
-
> In windows, Python is installed in `C:` drive by default. We can set `$PATH` by opening the **Environment variables** dialog box by following the steps below;
54
+
> In Windows, Python is installed in `C:` drive by default. We can set `$PATH` by opening the **Environment variables** dialog box by following the steps below;
59
55
>
60
56
> 1.[Right click on My Computer]
61
57
> 2. Select "Properties"
@@ -65,38 +61,32 @@ Step 1: Install the latest Python version on your computer and configure `PATH`
65
61
> 6. Look for "**_PATH_**" in "System Variables" section and click on it and press "Edit" button
66
62
> 7. To the end of "Variable value" text box, append "`C:\Python34\;C:\Python34\Scripts\;`" (without quotes and `34` may differ depending on the python version installed. It could be 35, 37 ...)
67
63
> 8. Click "OK" twice to save and move out from path windows
68
-
>
69
-
70
-
Step 2: Open up command prompt and execute the following commands to install the required dependencies.
71
64
65
+
**Step 2**: Open up command prompt and execute the following commands to install the required dependencies.
72
66
73
67
$ pip install pyserial
74
68
75
69
$ pip install numpy
76
70
77
-
#####Validate
71
+
#### Validate
78
72
79
73
1. Download the PSLab-Python library from this repository and extract it to a directory.
80
74
2. Browse in to that directory and create a new file named `test-pslab-libs.py`
81
75
3. Paste the following code into that file and save it.
82
-
83
76
```
84
77
from PSL import sciencelab
85
78
I = sciencelab.connect()
86
79
capacitance = I.get_capacitance()
87
80
print(capacitance)
88
81
```
89
-
90
82
4. Plug in the PSLab device and check if both the LEDs are turned on.
91
83
5. Now run this file by typing `python test-pslab-libs.py` on a command prompt and observe a numerical value printed on the screen along with PSLab device version and the port it is connected to.
92
84
93
-
-----------------------
94
-
95
-
#### Development Environment
85
+
### How to Setup the Development Environment
96
86
97
-
To set up the development environment, install the packages mentioned in dependencies. For building GUI's Qt Designer is used.
87
+
To set up the development environment, install the packages mentioned in dependencies. For building GUI's you can use Qt Designer or create a frontend using any other compatible technology. The PSLab desktop app is using Electron for example.
98
88
99
-
## Steps to build documentation
89
+
## How to Build the Documentation Website
100
90
101
91
First install sphinx by running following command
102
92
@@ -106,9 +96,6 @@ Then go to pslab/docs and run the following command
106
96
107
97
$ sudo make html
108
98
109
-
### Blog posts related to PSLab on FOSSASIA blog
110
-
*[Installation of PSLab](http://blog.fossasia.org/pslab-code-repository-and-installation/)
111
-
*[Communicating with PSLab](http://blog.fossasia.org/communicating-with-pocket-science-lab-via-usb-and-capturing-and-plotting-sine-waves/)
112
-
*[Features and Controls of PSLab](http://blog.fossasia.org/features-and-controls-of-pocket-science-lab/)
113
-
*[Design your own Experiments](http://blog.fossasia.org/design-your-own-experiments-with-pslab/)
114
-
*[New Tools and Sensors for Fossasia PSLab and ExpEYES](http://blog.fossasia.org/new-tools-and-sensors-fossasia-pslab-and-expeyes/)
99
+
## License
100
+
101
+
The library is free and open source software licensed under the [GPL v3](LICENSE). The copyright is owned by FOSSASIA.
0 commit comments