### Pre-requisites ###

-Python version 3.6.7
-Minimalmodbus version 2.0.1

### Installation & use (Windows) ###

1)Install the pre-requisites
*First install python 3.6.7 by going to the official python website (https://www.python.org/downloads/release/python-367/);
	do not forget the set the python command as a PATH.
*After installing python open the command prompt window
*Type: pip install minimalmodbus

2)Connect the programmable resistor to your computer

3)Find the name of the serial port
*Open device manager
*Expand Ports(COM & LPT)
*There should be the device USB Serial Device(COM3)
*The name of the serial port in this example is "COM3"

4)Update the serial port in "example.py"
*Open example.py in a text editor
*Replace 'COM0' with the name of your serial port from step 3)'COM3'

5)Run the example program
*Open the command prompt and navigate to the same folder as example.py
*Type: python example.py

### Installation & use (Linux/Ubuntu) ###

1) Install Python, pip, pyserial and minimalmodbus in the terminal
* Open a terminal window
* Type: sudo apt install python3
* Type: sudo apt install python3-pip
* Type: pip install minimalmodbus

2) Connect the programmable resistor to your computer

3) Find the name of the serial port
* Open the terminal window
* Type: sudo dmesg
* Since the device was connected recently, the output would be similar to "ttyACM0: USB ACM device"
* In this example "ttyACM0" is the name of the serial port

4) Update serial port in "example.py"
* Open example.py in a text editor
* Replace 'COM0' with the full path to the serial port from 3) e.g. '/dev/ttyACM0'
* Save the file

5) Run example program by ty
* Open the terminal and navigate to the same folder as example.py
* Type: python3 example.py