The central python installation to all IT Services Windows PCs including PC classrooms and the Teaching Laboratories is faulty. IT Services are working to repair the installation configuration, but this is taking some time.
In order to run python scripts from a terminal or powershell environment you will first need to run:
Set-Alias -Name python -Value C:\ProgramData\Anaconda3\python.exe
Once this line has been run, the window should then execute scripts normally using regular python commands.
This should not affect home installations of python.
These scripts are used for the lab practical for constructing a photometer. The PySerial library is required for this script.
The take_measurement.py script reads serial data sent to the computer from the Arduino. The script will need the interface variable editing to reflect the hardware setup of the specific computer (see below for information about determining hardware interfaces).
take_measurement.py (python) ↓
The arduino_photometer.ino is an Arduino script which runs on the Arduino, configuring the device to send serial data from pin A0 to the computer.
arduino_photometer.ino (Arduino Sketch) ↓
To determine the hardware interface being used by the Arduino, the following python command can be run:
python -m serial.tools.list_ports -v