This script talks to a device running OpenAFE Comm, giving the device the necessary commands to make following voltammetry processes: cyclic, differential pulse and square wave.
NOTE: The DPV and SWV processes are not yet implemented.
- An Arduino Uno running OpenAFE Comm.
- An OpenAFE Shield.
- Install python (64 bits) in your machine, it is available on this link
It is important that the python version installed is 64 bits, because otherwise the
matplotlibmay fail to install.
- Install matplotlib with pip through your machine terminal (cmd/bash):
pip install matplotlib
-
Download, clone or copy the
openafe_plotter.pyscript into a folder of your preference. -
Then, open the
openafe_plotter.pyfile, and modify the parameters present on the top of the script:
# Adjust the parameters below according to your needs:
# Comment or de-comment the voltammetry type as needed.
# COM port:
COM_PORT = "COM6" # The COM port to which the Arduino is connected
# Parameters:
voltammetryType = "CV" # Cyclic Voltammetry
# voltammetryType = "DPV" # Differential Pulse Voltammetry
# voltammetryType = "SW" # Square Wave
startingPotential_millivolts = -500
endingPotential_millivolts = 500
scanRate_millivoltsPerSecond = 250
stepSize_millivolts = 2
numberOfCycles = 1
settlingTime_milliseconds = 1000
# Graph Options:
graphTitle = "H2O + NaCl Cyclic Voltammetry" # the graph title to be displayed, can be left in blank
graphSubTitle = "" # the graph sub title, can be left blank
gridVisible = True # Change to True or False, to make the grid visible or hidden, respectively- After that, symply run it, with the following command:
python openafe_plotter.py
That's it! Once the graph is done you can tweak it to your liking and then save it, if you wish.
