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
Copy file name to clipboardExpand all lines: README.md
+7-43Lines changed: 7 additions & 43 deletions
Original file line number
Diff line number
Diff line change
@@ -22,61 +22,25 @@ This repository hosts the python library for communicating with the Pocket Scien
22
22
23
23
## Installation
24
24
25
-
To install PSLab on Debian based GNU/Linux system, the following dependencies must be installed.
25
+
pslab-python can be installed from PyPI:
26
26
27
-
### Dependencies
27
+
$ pip install pslab
28
28
29
-
* Python 3.6 or higher [Link to Official download page](https://www.python.org/downloads/windows/)
30
-
* Pip **Support package installer**
31
-
* NumPy **For numerical calculations**
32
-
* PySerial **For device connection**
33
-
* iPython-qtconsole **_Optional_**
29
+
**Note**: Linux users must additionally install a udev rules file for pslab-python to be able to communicate with the PSLab device. The file 99-pslab.rules should be copied from the installation directory to /etc/udev/rules.d/.
34
30
35
-
**Note**: If you are 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, install the [pslab-desktop app](https://github.com/fossasia/pslab-desktop) and follow the instructions of the Readme in that repo.
31
+
**Note**: If you are only interested in using PSLab as an acquisition device without a display/GUI, only pslab-python needs to be installed. If you would like a GUI, install the [pslab-desktop app](https://github.com/fossasia/pslab-desktop) and follow the instructions of the Readme in that repo.
**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. 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:
48
-
49
-
1.[Right click on My Computer]
50
-
2. Select "Properties"
51
-
3. Open "System Properties"
52
-
4. Click "Advanced" tab
53
-
5. Click "Environment Variables" button
54
-
6. Look for "**_PATH_**" in "System Variables" section and click on it and press "Edit" button
55
-
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 ...)
56
-
8. Click "OK" twice to save and move out from path windows
57
-
58
-
**Step 2**: Open up command prompt and execute the following commands to install the required dependencies.
59
-
60
-
$ pip install pyserial
61
-
$ pip install numpy
62
-
63
-
#### Validate
64
-
65
-
1. Download the PSLab-Python library from this repository and extract it to a directory.
66
-
2. Browse in to that directory and create a new file named `test-pslab-libs.py`
67
-
3. Paste the following code into that file and save it.
36
+
1. Plug in the PSLab device and check that both the LEDs light up.
37
+
2. Run the following piece of code in a Python interpreter:
68
38
```
69
39
from PSL import sciencelab
70
40
I = sciencelab.connect()
71
41
capacitance = I.get_capacitance()
72
42
print(capacitance)
73
43
```
74
-
4. Plug in the PSLab device and check if both the LEDs are turned on.
75
-
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.
76
-
77
-
### How to Setup the Development Environment
78
-
79
-
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.
0 commit comments