├── .gitattributes
├── .github
└── ISSUE_TEMPLATE
│ └── bug_report.md
├── .gitignore
├── BootloaderExample_Python
├── fw_upload_serial_port.py
├── lib
│ └── fw_upload_lib.py
└── readme.txt
├── Example_MethodSCRIPTs
├── MSExample001-EmStat4M_with_MUX8_multiplexer.txt
├── MSExample002-SensitBT_running_and_storing_SWV.txt
├── MSExample003-SensitBT_temp_measurement_I2C.txt
├── MSExample004-SensitBT_wake_on_trigger_button.txt
├── MSExample005-SensitBT_run_CV_on_trigger_button_and_store.txt
├── MSExample006-Peak_search_using_min_max.txt
└── MSExample007-EmStatPicoMux16.txt
├── LICENSE.txt
├── MethodSCRIPTExample_Android
├── .gitignore
├── .idea
│ ├── codeStyles
│ │ └── Project.xml
│ ├── gradle.xml
│ ├── misc.xml
│ ├── runConfigurations.xml
│ └── vcs.xml
├── GettingStarted_MethodSCRIPT_Example_Android.docx
├── GettingStarted_MethodSCRIPT_Example_Android.pdf
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── methodSCRIPTExample
│ ├── .gitignore
│ ├── build.gradle
│ ├── libs
│ │ └── d2xx.jar
│ ├── proguard-rules.pro
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── assets
│ │ ├── LSV_on_10kOhm.txt
│ │ └── SWV_on_10kOhm.txt
│ │ ├── java
│ │ └── com
│ │ │ └── palmsens
│ │ │ └── methodSCRIPTExample
│ │ │ └── MethodSCRIPTExample.java
│ │ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ └── ic_launcher_background.xml
│ │ ├── layout
│ │ └── activity_method_script_example.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ │ └── xml
│ │ └── device_filter.xml
├── msBluetooth
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── assets
│ │ ├── LSV_on_10kOhm.txt
│ │ └── SWV_on_10kOhm.txt
│ │ ├── java
│ │ └── com
│ │ │ └── palmsens
│ │ │ └── msBluetooth
│ │ │ ├── BluetoothConnectionService.java
│ │ │ └── MSBluetoothActivity.java
│ │ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ └── ic_launcher_background.xml
│ │ ├── layout-land
│ │ └── activity_msbluetooth.xml
│ │ ├── layout
│ │ └── activity_msbluetooth.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── settings.gradle
├── MethodSCRIPTExample_Arduino
├── GettingStarted_MethodSCRIPT_Example_Arduino.docx
├── GettingStarted_MethodSCRIPT_Example_Arduino.pdf
├── MathHelperLibrary
│ ├── LICENSE.md
│ └── MathHelpers.h
├── MethodSCRIPTComm
│ ├── MSComm.c
│ ├── MSComm.h
│ └── MSCommon.h
└── MethodSCRIPTExample
│ └── MethodSCRIPTExample.ino
├── MethodSCRIPTExample_C#
├── GettingStarted_MethodSCRIPT_Example_C#.docx
├── GettingStarted_MethodSCRIPT_Example_C#.pdf
├── MSCodeExamples.sln
├── MSConsoleExample
│ ├── App.config
│ ├── MSConsoleExample.csproj
│ ├── Program.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── scripts
│ │ ├── LSV_on_10kOhm.txt
│ │ └── SWV_on_10kOhm.txt
├── MSEISConsoleExample
│ ├── App.config
│ ├── MSEISConsoleExample.csproj
│ ├── Program.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── scripts
│ │ └── EIS_on_Randles_560Ohm_10kOhm_33nF.txt
├── MSEISPlotExample
│ ├── App.config
│ ├── FormEISPlotExample.Designer.cs
│ ├── FormEISPlotExample.cs
│ ├── FormEISPlotExample.resx
│ ├── MSEISPlotExample.csproj
│ ├── Program.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ ├── packages.config
│ └── scripts
│ │ └── EIS_on_Randles_560Ohm_10kOhm_33nF.txt
└── MSPlotExample
│ ├── App.config
│ ├── FormPlotExample.Designer.cs
│ ├── FormPlotExample.cs
│ ├── FormPlotExample.resx
│ ├── MSPlotExample.csproj
│ ├── Program.cs
│ ├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
│ ├── packages.config
│ └── scripts
│ ├── LSV_on_10kOhm.txt
│ └── SWV_on_10kOhm.txt
├── MethodSCRIPTExample_C
├── GettingStarted_MethodSCRIPT_Example_C.docx
├── GettingStarted_MethodSCRIPT_Example_C.pdf
└── MethodSCRIPTExample_C
│ ├── .gitignore
│ ├── Doxyfile
│ ├── Makefile
│ ├── Makefile_windows
│ ├── MethodSCRIPT-example.sln
│ ├── MethodSCRIPT-example.vcxproj
│ ├── make.bat
│ ├── results
│ └── .gitignore
│ ├── scripts
│ ├── example_EIS.mscr
│ ├── example_LSV_10k.mscr
│ └── example_SWV_10k.mscr
│ └── src
│ ├── example.c
│ └── palmsens
│ ├── mscript.c
│ ├── mscript.h
│ ├── mscript_debug_printf.h
│ ├── mscript_serial_port.h
│ ├── mscript_serial_port_linux.c
│ └── mscript_serial_port_windows.c
├── MethodSCRIPTExample_Python
├── GettingStarted_MethodSCRIPT_Example_Python.docx
├── GettingStarted_MethodSCRIPT_Example_Python.pdf
├── MethodSCRIPTExample_Python
│ ├── console_example.py
│ ├── palmsens
│ │ ├── instrument.py
│ │ ├── mscript.py
│ │ └── serial.py
│ ├── plot_advanced_swv.py
│ ├── plot_cv.py
│ ├── plot_eis.py
│ ├── requirements.txt
│ ├── revision_history.txt
│ ├── scripts
│ │ ├── example_advanced_swv_es4.mscr
│ │ ├── example_advanced_swv_espico.mscr
│ │ ├── example_cv.mscr
│ │ └── example_eis.mscr
│ └── tox.ini
└── MethodSCRIPT_Example_Python.code-workspace
├── MethodSCRIPTExample_iOS
├── .com.greenworldsoft.syncfolderspro
├── .idea
│ ├── .gitignore
│ ├── MethodSCRIPTExample_Swift.iml
│ ├── dictionaries
│ │ └── evertwiesenekker.xml
│ ├── misc.xml
│ ├── modules.xml
│ ├── vcs.xml
│ └── xcode.xml
├── GettingStarted_MethodSCRIPT_Example_iOS.docx
├── GettingStarted_MethodSCRIPT_Example_iOS.pdf
├── MethodSCRIPTExample_iOS.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ ├── evertwiesenekker.xcuserdatad
│ │ │ ├── UserInterfaceState.xcuserstate
│ │ │ ├── xcdebugger
│ │ │ │ └── Expressions.xcexplist
│ │ │ └── xcschemes
│ │ │ │ └── xcschememanagement.plist
│ │ │ └── mallepietje.xcuserdatad
│ │ │ ├── UserInterfaceState.xcuserstate
│ │ │ └── xcschemes
│ │ │ └── xcschememanagement.plist
│ └── xcuserdata
│ │ ├── evertwiesenekker.xcuserdatad
│ │ ├── xcdebugger
│ │ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ │ ├── MethodSCRIPTExample_Swift.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ └── mallepietje.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── MethodSCRIPTExample_Swift.xcscheme
│ │ └── xcschememanagement.plist
└── MethodSCRIPTExample_iOS
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── PalmSensLogo120x120.png
│ │ ├── PalmSensLogo180x180.png
│ │ ├── PalmSensLogo40x40.png
│ │ └── PalmSensLogo60x60.png
│ └── Contents.json
│ ├── BLEConnection.swift
│ ├── Base.lproj
│ └── LaunchScreen.storyboard
│ ├── ContentView.swift
│ ├── Extensions.swift
│ ├── Info.plist
│ ├── Logger.swift
│ ├── Preview Content
│ └── Preview Assets.xcassets
│ │ └── Contents.json
│ └── SceneDelegate.swift
└── README.md
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior.
15 |
16 | **Expected behavior**
17 | A clear and concise description of what you expected to happen.
18 |
19 | **Screenshots**
20 | If applicable, add screenshots to help explain your problem.
21 |
22 | **Used example**
23 | The name of the example that was used.
24 |
25 | **Used device(s)**
26 | The PalmSens potentiostat device and host system used.
27 |
28 | **Additional context**
29 | Add any other context about the problem here. It can be helpful to attach the following:
30 | - Custom MethodSCRIPT's
31 | - Communication logs
32 | - Example output logs
33 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | [Xx]64/
19 | [Xx]86/
20 | [Bb]uild/
21 | bld/
22 | [Bb]in/
23 | [Oo]bj/
24 |
25 | # Visual Studio 2015 cache/options directory
26 | .vs/
27 | # Uncomment if you have tasks that create the project's static files in wwwroot
28 | #wwwroot/
29 |
30 | # MSTest test Results
31 | [Tt]est[Rr]esult*/
32 | [Bb]uild[Ll]og.*
33 |
34 | # NUNIT
35 | *.VisualState.xml
36 | TestResult.xml
37 |
38 | # Build Results of an ATL Project
39 | [Dd]ebugPS/
40 | [Rr]eleasePS/
41 | dlldata.c
42 |
43 | # DNX
44 | project.lock.json
45 | artifacts/
46 |
47 | *_i.c
48 | *_p.c
49 | *_i.h
50 | *.ilk
51 | *.meta
52 | *.obj
53 | *.pch
54 | *.pdb
55 | *.pgc
56 | *.pgd
57 | *.rsp
58 | *.sbr
59 | *.tlb
60 | *.tli
61 | *.tlh
62 | *.tmp
63 | *.tmp_proj
64 | *.log
65 | *.vspscc
66 | *.vssscc
67 | .builds
68 | *.pidb
69 | *.svclog
70 | *.scc
71 |
72 | # Chutzpah Test files
73 | _Chutzpah*
74 |
75 | # Visual C++ cache files
76 | ipch/
77 | *.aps
78 | *.ncb
79 | *.opendb
80 | *.opensdf
81 | *.sdf
82 | *.cachefile
83 | *.VC.db
84 |
85 | # Visual Studio profiler
86 | *.psess
87 | *.vsp
88 | *.vspx
89 | *.sap
90 |
91 | # TFS 2012 Local Workspace
92 | $tf/
93 |
94 | # Guidance Automation Toolkit
95 | *.gpState
96 |
97 | # ReSharper is a .NET coding add-in
98 | _ReSharper*/
99 | *.[Rr]e[Ss]harper
100 | *.DotSettings.user
101 |
102 | # JustCode is a .NET coding add-in
103 | .JustCode
104 |
105 | # TeamCity is a build add-in
106 | _TeamCity*
107 |
108 | # DotCover is a Code Coverage Tool
109 | *.dotCover
110 |
111 | # NCrunch
112 | _NCrunch_*
113 | .*crunch*.local.xml
114 | nCrunchTemp_*
115 |
116 | # MightyMoose
117 | *.mm.*
118 | AutoTest.Net/
119 |
120 | # Web workbench (sass)
121 | .sass-cache/
122 |
123 | # Installshield output folder
124 | [Ee]xpress/
125 |
126 | # DocProject is a documentation generator add-in
127 | DocProject/buildhelp/
128 | DocProject/Help/*.HxT
129 | DocProject/Help/*.HxC
130 | DocProject/Help/*.hhc
131 | DocProject/Help/*.hhk
132 | DocProject/Help/*.hhp
133 | DocProject/Help/Html2
134 | DocProject/Help/html
135 |
136 | # Click-Once directory
137 | publish/
138 |
139 | # Publish Web Output
140 | *.[Pp]ublish.xml
141 | *.azurePubxml
142 |
143 | # TODO: Un-comment the next line if you do not want to checkin
144 | # your web deploy settings because they may include unencrypted
145 | # passwords
146 | #*.pubxml
147 | *.publishproj
148 |
149 | # NuGet Packages
150 | *.nupkg
151 | # The packages folder can be ignored because of Package Restore
152 | **/packages/*
153 | # except build/, which is used as an MSBuild target.
154 | !**/packages/build/
155 | # Uncomment if necessary however generally it will be regenerated when needed
156 | #!**/packages/repositories.config
157 | # NuGet v3's project.json files produces more ignoreable files
158 | *.nuget.props
159 | *.nuget.targets
160 |
161 | # Microsoft Azure Build Output
162 | csx/
163 | *.build.csdef
164 |
165 | # Microsoft Azure Emulator
166 | ecf/
167 | rcf/
168 |
169 | # Windows Store app package directory
170 | AppPackages/
171 | BundleArtifacts/
172 |
173 | # Visual Studio cache files
174 | # files ending in .cache can be ignored
175 | *.[Cc]ache
176 | # but keep track of directories ending in .cache
177 | !*.[Cc]ache/
178 |
179 | # Others
180 | ClientBin/
181 | [Ss]tyle[Cc]op.*
182 | ~$*
183 | *~
184 | *.dbmdl
185 | *.dbproj.schemaview
186 | *.pfx
187 | *.publishsettings
188 | node_modules/
189 | orleans.codegen.cs
190 |
191 | # RIA/Silverlight projects
192 | Generated_Code/
193 |
194 | # Backup & report files from converting an old project file
195 | # to a newer Visual Studio version. Backup files are not needed,
196 | # because we have git ;-)
197 | _UpgradeReport_Files/
198 | Backup*/
199 | UpgradeLog*.XML
200 | UpgradeLog*.htm
201 |
202 | # SQL Server files
203 | *.mdf
204 | *.ldf
205 |
206 | # Business Intelligence projects
207 | *.rdl.data
208 | *.bim.layout
209 | *.bim_*.settings
210 |
211 | # Microsoft Fakes
212 | FakesAssemblies/
213 |
214 | # GhostDoc plugin setting file
215 | *.GhostDoc.xml
216 |
217 | # Node.js Tools for Visual Studio
218 | .ntvs_analysis.dat
219 |
220 | # Visual Studio 6 build log
221 | *.plg
222 |
223 | # Visual Studio 6 workspace options file
224 | *.opt
225 |
226 | # Visual Studio LightSwitch build output
227 | **/*.HTMLClient/GeneratedArtifacts
228 | **/*.DesktopClient/GeneratedArtifacts
229 | **/*.DesktopClient/ModelManifest.xml
230 | **/*.Server/GeneratedArtifacts
231 | **/*.Server/ModelManifest.xml
232 | _Pvt_Extensions
233 |
234 | # LightSwitch generated files
235 | GeneratedArtifacts/
236 | ModelManifest.xml
237 |
238 | # Paket dependency manager
239 | .paket/paket.exe
240 |
241 | # FAKE - F# Make
242 | .fake/
243 |
244 | # Python cache files
245 | *.pyc
246 | __pycache__/
247 |
248 | # Apple/Windows desktop files
249 | .DS_Store
250 | desktop.ini
251 |
252 | /.metadata
253 | /MethodSCRIPTExample_Android/.metadata/.plugins
254 | /MethodSCRIPTExample_Android/.metadata/.mylyn
255 | /MethodSCRIPTExample_Android/.metadata
256 | /MethodSCRIPTExample_Android/methodSCRIPTExample/.settings/org.eclipse.cdt.managedbuilder.core.prefs
257 | /MethodSCRIPTExample_Arduino/.metadata
258 | /MethodSCRIPTExample_C/.metadata
259 | /MethodSCRIPTExample_C/MethodSCRIPTExample_C/**/.settings/language.settings.xml
260 | /MethodSCRIPTExample_C/MethodSCRIPTExample_C/**/.settings/org.eclipse.cdt.managedbuilder.core.prefs
261 | /MethodSCRIPTExample_iOS/.DS_Store
262 | /MethodSCRIPTExample_Python/MethodSCRIPTExample_Python/output
263 | /MethodSCRIPTExample_Python/MethodSCRIPTExample_Python/venv
264 | MethodSCRIPTExamples.zip
265 | /**/workspace/
266 |
--------------------------------------------------------------------------------
/BootloaderExample_Python/fw_upload_serial_port.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | """
3 | Upload a firmware binary to a PalmSens device, using a serial port connection.
4 | """
5 |
6 | # usage: fw_upload_serial_port.py [-h] [-f {off,soft,hard}] [-b BAUDRATE] binary port
7 | # positional arguments:
8 | # binary The binary to upload
9 | # port The COM port connected the bootloader
10 | #
11 | # options:
12 | # -h, --help show this help message and exit
13 | # -f {off,soft,hard}, --flow_control {off,soft,hard}
14 | # -b BAUDRATE, --baudrate BAUDRATE
15 |
16 | from pathlib import Path
17 | import argparse
18 | import serial
19 | from lib.fw_upload_lib import program
20 |
21 | SERIAL_TIMEOUT = 15
22 |
23 | if __name__ == "__main__":
24 |
25 | parser = argparse.ArgumentParser(description=__doc__)
26 | parser.add_argument(
27 | "binary",
28 | type=Path,
29 | help="The binary to upload",
30 | )
31 | parser.add_argument(
32 | "port",
33 | type=str,
34 | help="The COM port connected the bootloader",
35 | )
36 | parser.add_argument(
37 | "-f",
38 | "--flow_control",
39 | choices=["off", "soft", "hard"],
40 | default="hard",
41 | )
42 | parser.add_argument(
43 | "-b",
44 | "--baudrate",
45 | default=230400,
46 | )
47 |
48 | args = parser.parse_args()
49 | program(
50 | args.binary,
51 | serial.Serial(
52 | args.port,
53 | args.baudrate,
54 | timeout=SERIAL_TIMEOUT,
55 | rtscts=(args.flow_control == "hard"),
56 | xonxoff=(args.flow_control == "soft"),
57 | ),
58 | )
59 |
--------------------------------------------------------------------------------
/BootloaderExample_Python/lib/fw_upload_lib.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | """
3 | Library for programming a binary file using the PalmSens bootloader for MethodSCRIPT devices.
4 | """
5 |
6 | from pathlib import Path
7 | from io import RawIOBase
8 |
9 |
10 | def program(binary: Path, channel: RawIOBase):
11 | """Download a firmware binary to a PalmSens bootloader
12 |
13 | binary: The binary to upload
14 |
15 | channel: The binary communications channel to use
16 | """
17 |
18 |
19 | def tx_and_rx(channel: RawIOBase, data: bytes):
20 | """Transmit data and check reply does not error
21 |
22 | `extra_lines` can be used if the device returns multiple lines in
23 | response to a single command (like `t`)
24 | """
25 | channel.write(data)
26 |
27 | ret_data = channel.readline()
28 | if b"!" in ret_data:
29 | msg = f"Got device error {ret_data}, after sending {data.decode('utf8')}"
30 | raise RuntimeError(msg)
31 |
32 |
33 | def fletcher(inp: bytes) -> int:
34 | """Compute the fletcher CRC for a byte stream"""
35 | sum1 = 0
36 | sum2 = 0
37 | for byte in inp:
38 | sum1 = (sum1 + byte) % 255
39 | sum2 = (sum1 + sum2) % 255
40 | return (sum2 << 8) | sum1
41 |
42 |
43 | # End a previous download if there is one. Just in case.
44 | try:
45 | tx_and_rx(channel, b"endfw\n")
46 | except RuntimeError:
47 | pass
48 |
49 | print("Erasing")
50 | tx_and_rx(channel, b"startfw\n")
51 |
52 | with open(binary, "rb") as fw_file:
53 | index = 0
54 | while(chunk := fw_file.read(50)):
55 | index = index + 1
56 | payload = (
57 | f"{len(chunk):02x}".encode("ascii")
58 | + chunk.hex().encode("ascii")
59 | + f"{fletcher(chunk):04x}".encode("ascii")
60 | )
61 | tx_and_rx(channel, b"data" + payload + b"\n")
62 | print(f"Uploading {index}\r", end='', flush=True)
63 |
64 | print("\nFinishing upload")
65 | tx_and_rx(channel, b"endfw\n")
66 |
67 | print("Rebooting")
68 | tx_and_rx(channel, b"boot\n")
69 |
--------------------------------------------------------------------------------
/BootloaderExample_Python/readme.txt:
--------------------------------------------------------------------------------
1 | This example can be used to upload firmware on any of the following PalmSens devices:
2 | - EmStat4
3 | - EmStat Pico
4 | - Nexus
5 |
6 | Only serial port connections (generally Serial USB Converters) are supported.
7 | To add another type of port, copy and modify the file "fw_upload_serial_port.py".
8 |
9 | The device must be already in bootloader mode before running the bootloader example.
10 | On most PalmSens devices, this can be done either by pulling the DWNLD pin low, or sending the "dlfw\n" command.
11 |
--------------------------------------------------------------------------------
/Example_MethodSCRIPTs/MSExample001-EmStat4M_with_MUX8_multiplexer.txt:
--------------------------------------------------------------------------------
1 | e
2 | #############
3 | # MethodSCRIPT example for potentiostats by PalmSens BV - www.palmsens.com
4 | #
5 | #
6 | # Description: Runs a chronoamperometry measurement on each channel sequentially of a MUX8 multiplexer
7 | # The MUX8 inputs d0,d1 and d2 should be connected to d0,d1 and d2 digital outputs of the EmStat4M
8 | #
9 | #
10 | # MethodSCRIPT version: 1.3
11 | # Last modified: 17/05/2023
12 | # Applies to: EmStat4M with a MUX8 multiplexer
13 | # Go to www.palmsens.com/msmanual for the MethodSCRIPT Manual
14 | #
15 | var c
16 | var p
17 | var i
18 | var t
19 | set_gpio_cfg 0b111 1
20 | store_var i 0i aa
21 | ############# Measurement initialisation #############
22 | set_pgstat_chan 0
23 | set_pgstat_mode 3
24 | set_max_bandwidth 40
25 | set_range ba 2100n
26 | set_autoranging ba 2100n 2100u
27 | set_e 500m
28 | cell_on
29 | loop i < 8i
30 | set_gpio i
31 | timer_start
32 | meas_loop_ca p c 500m 100m 60100m
33 | timer_get t
34 | pck_start
35 | pck_add t
36 | pck_add c
37 | pck_end
38 | endloop
39 | add_var i 1i
40 | endloop
41 | on_finished:
42 | cell_off
43 |
44 |
--------------------------------------------------------------------------------
/Example_MethodSCRIPTs/MSExample002-SensitBT_running_and_storing_SWV.txt:
--------------------------------------------------------------------------------
1 | e
2 | #############
3 | # MethodSCRIPT example for potentiostats by PalmSens BV - www.palmsens.com
4 | #
5 | #
6 | # Description: This example shows how to run an SWV on the Sensit BT
7 | # and save the results on internal storage
8 | #
9 | # MethodSCRIPT version: 1.3
10 | # Last modified: 22/05/2023
11 | # Applies to: Sensit BT (with EmStat Pico)
12 | # Go to www.palmsens.com/msmanual for the MethodSCRIPT Manual
13 | #
14 | #############
15 | # Sets GPIO pin configuration. Bitmask followed by 2 for enabling SPI flash memory
16 | set_gpio_cfg 0x1E 2
17 | # 1=Create new file. If a file with the same name exists, new data is appended to it
18 | file_open "/Measurements/14-04-2022/SWV-10-49-16-0.dmeas" 1
19 | # 3=Output to both normal channel and file storage
20 | set_script_output 3
21 | # for potential
22 | var p
23 | # for measured current
24 | var c
25 | # for measured forward current
26 | var f
27 | # for measured reverse current
28 | var g
29 | ############# Measurement initialisation #############
30 | set_pgstat_chan 1
31 | set_pgstat_mode 0
32 | set_pgstat_chan 0
33 | set_pgstat_mode 2
34 | set_max_bandwidth 200
35 | set_range_minmax da -400m 400m
36 | set_range ba 59n
37 | set_autoranging ba 59n 59n
38 | set_e -300m
39 | cell_on
40 | # SWV Ebegin=-0.3V, Eend=0.3V, Estep=0.01V, Eamp=0.1V, 5 Hz
41 | meas_loop_swv p c f g -300m 300m 10m 100m 5
42 | pck_start
43 | pck_add p
44 | pck_add c
45 | pck_add f
46 | pck_add g
47 | pck_end
48 | endloop
49 | on_finished:
50 | file_close
51 | cell_off
52 |
53 |
--------------------------------------------------------------------------------
/Example_MethodSCRIPTs/MSExample003-SensitBT_temp_measurement_I2C.txt:
--------------------------------------------------------------------------------
1 | e
2 | # MethodSCRIPT example for potentiostats by PalmSens BV - www.palmsens.com
3 | #
4 | # Description: Run SWV + internal temperature measurement (using ADT7420 inside the EmStat Pico module) with I2C
5 | #
6 | # MethodSCRIPT version: 1.3
7 | # Last modified: 22/05/2023
8 | # Applies to: Sensit BT (with EmStat Pico)
9 | #
10 | ############# I2C Temperature measurement initialisation #############
11 | # Declare variables for Temperature measurement
12 | # Most significant bits
13 | var m
14 | # Least significant bits
15 | var l
16 | # Acknowledge
17 | var a
18 | # Array with Write data
19 | array w 2
20 | # Array with Read data
21 | array r 2
22 | # Status register
23 | var s
24 | # Configure I2C GPIOs and set it to 100 kHz clock, 7-bit address
25 | set_gpio_cfg 0x0300i 2
26 | i2c_config 100k 7
27 | # Configure the sensor for 16-bit mode with continuous conversion
28 | store_var a 0i ja
29 | array_set w 0i 0x03i
30 | array_set w 1i 0x80i
31 | i2c_write 0x48i w 2 a
32 | ############# Declare measurement variables variables #############
33 | var p
34 | var c
35 | var f
36 | var g
37 | ############# Measurement initialisation #############
38 | set_pgstat_chan 0
39 | set_pgstat_mode 2
40 | set_max_bandwidth 200
41 | set_range_minmax da -400m 400m
42 | set_range ba 59n
43 | set_autoranging ba 59n 59n
44 | set_e -300m
45 | cell_on
46 | ############# Run measurement #############
47 | # Perform SWV measurement from -300 mV to 300 mV at 5 Hz
48 | meas_loop_swv p c f g -300m 300m 10m 100m 5
49 | ############# Get I2C temperature #############
50 | # Check if temperature sensor is ready
51 | store_var s 0x80i ja
52 | i2c_write_byte 0x48i 0x02i a
53 | i2c_read_byte 0x48i s a
54 | bit_and_var s 0x80i
55 | # Ignore if temperature sensor not ready.
56 | if s != 0x80i
57 | # Read temperature values
58 | i2c_write_byte 0x48i 0x00i a
59 | i2c_read 0x48i r 2 a
60 | array_get r 0i m
61 | array_get r 1i l
62 | # Convert to degrees Celcius
63 | bit_lsl_var m 8i
64 | add_var m l
65 | if m > 0x8000i
66 | sub_var m 0x10000i
67 | endif
68 | int_to_float m
69 | div_var m 128
70 | endif
71 | ############# Send measurement package #############
72 | pck_start
73 | # Sweep potential
74 | pck_add p
75 | # Current
76 | pck_add c
77 | # Temperature
78 | pck_add m
79 | pck_end
80 | endloop
81 | on_finished:
82 | cell_off
83 |
84 |
--------------------------------------------------------------------------------
/Example_MethodSCRIPTs/MSExample004-SensitBT_wake_on_trigger_button.txt:
--------------------------------------------------------------------------------
1 | e
2 | # MethodSCRIPT example for potentiostats by PalmSens BV - www.palmsens.com
3 | #
4 | # Description: Hibernate in low power mode, wake up on WAKE pin event (button push)
5 | #
6 | # MethodSCRIPT version: 1.3
7 | # Last modified: 22/05/2023
8 | # Applies to: Sensit BT (with EmStat Pico)
9 | # Go to www.palmsens.com/msmanual for the MethodSCRIPT Manual
10 | #
11 | ############# Hibernate and wait for button push #############
12 | #Hibernate in low power mode, wake up on WAKE pin event (button push)
13 | #Could also have used get_gpio on with GPIO pin if saving power wasn't a concern
14 | #Bitmask for wake-up sources:
15 | #0x01 = Communication
16 | #0x02 = WAKE pin
17 | #0x04 = Timer
18 | #At least one wake-up source must be specified.
19 | #60=60 seconds used by the Timer if Timer flag was set, ignored now since we use only wake pin.
20 | hibernate 0x02i 60
21 | ############# Declare measurement variables variables #############
22 | var p
23 | var c
24 | var f
25 | var g
26 | ############# Measurement initialisation #############
27 | set_pgstat_chan 0
28 | set_pgstat_mode 2
29 | set_max_bandwidth 200
30 | set_range_minmax da -400m 400m
31 | set_range ba 59n
32 | set_autoranging ba 59n 59n
33 | set_e -300m
34 | cell_on
35 | ############# Run measurement #############
36 | # Perform SWV measurement from -300 mV to 300 mV at 5 Hz
37 | meas_loop_swv p c f g -300m 300m 10m 100m 5
38 | pck_start
39 | # Sweep potential
40 | pck_add p
41 | # Current
42 | pck_add c
43 | pck_end
44 | endloop
45 | on_finished:
46 | cell_off
47 |
48 |
--------------------------------------------------------------------------------
/Example_MethodSCRIPTs/MSExample005-SensitBT_run_CV_on_trigger_button_and_store.txt:
--------------------------------------------------------------------------------
1 | e
2 | #############
3 | # MethodSCRIPT example for potentiostats by PalmSens BV - www.palmsens.com
4 | #
5 | #
6 | # Description: This example shows how to run three CVs on the Sensit BT
7 | # every CV starts at the push of the trigger button
8 | # results are stored on the internal storage
9 | #
10 | # MethodSCRIPT version: 1.3
11 | # Last modified: 17/05/2023
12 | # Applies to: Sensit BT (with EmStat Pico)
13 | # Go to www.palmsens.com/msmanual for the MethodSCRIPT Manual
14 | #
15 | #############
16 | #The following line is only needed for EmStat Pico based devices. Bitmask followed by 2 for enabling SPI flash memory
17 | set_gpio_cfg 0x1E 2
18 | file_open "/Measurements/three_cvs.dmeas" 0
19 | #set_script_output options:
20 | #0 = Disable the output of the script completely.
21 | #1 = Output to the normal output channel (default).
22 | #2 = Output to file storage.
23 | #3 = Output to both normal channel and file storage.
24 | set_script_output 2
25 | var i
26 | var c
27 | var p
28 | var d
29 | ############# Measurement initialisation #############
30 | set_pgstat_chan 0
31 | set_pgstat_mode 2
32 | set_max_bandwidth 400
33 | set_range_minmax da -1 1
34 | set_range ba 100u
35 | set_autoranging ba 1u 1m
36 | set_e -500m
37 | #make sure to start the loop at i=0
38 | store_var i 0i aa
39 | #start a loop with 3 iteratons
40 | loop i < 3i
41 | ############# wait for trigger button here #############
42 | get_gpio d
43 | loop d & 0x80
44 | get_gpio d
45 | endloop
46 | #
47 | cell_on
48 | meas_loop_cv p c -500m -1 1 10m 1
49 | pck_start
50 | pck_add p
51 | pck_add c
52 | pck_end
53 | endloop
54 | cell_off
55 | add_var i 1i
56 | endloop
57 | on_finished:
58 | file_close
59 | cell_off
60 |
61 |
--------------------------------------------------------------------------------
/Example_MethodSCRIPTs/MSExample006-Peak_search_using_min_max.txt:
--------------------------------------------------------------------------------
1 | e
2 | #############
3 | # MethodSCRIPT example for potentiostats by PalmSens BV - www.palmsens.com
4 | #
5 | #
6 | # Description: Simple peak detection after runnning an SWV on an EmStat4M
7 | #
8 | # MethodSCRIPT version: 1.3
9 | # Last modified: 17/05/2023
10 | # Applies to: all MethodSCRIPT-compatible instruments, example tailored for EmStat4M
11 | # Go to www.palmsens.com/msmanual for the MethodSCRIPT Manual
12 | #
13 | ############# Declare measurement variables variables #############
14 | var c
15 | var p
16 | var f
17 | var g
18 | ############# Init peak detect #############
19 | # Declare variables
20 | var n
21 | var i
22 | var m
23 | var l
24 | array a 100i
25 | array b 100i
26 | store_var n 0i ja
27 | store_var m 0 ba
28 | store_var l 1M ba
29 | ############# Configure LED pins (EmStat4M) #############
30 | set_gpio_cfg 0x7 1
31 | set_gpio 0x0
32 | ############# Measurement initialisation #############
33 | set_pgstat_chan 0
34 | set_pgstat_mode 2
35 | set_max_bandwidth 200
36 | set_range_minmax da -400m 400m
37 | set_range ba 59n
38 | set_autoranging ba 59n 59n
39 | set_e -300m
40 | cell_on
41 | ############# Run measurement #############
42 | # Perform SWV measurement from -300 mV to 300 mV at 5 Hz
43 | meas_loop_swv p c f g -300m 300m 10m 100m 5
44 | # Store measurement data in array
45 | array_set a n p
46 | array_set b n c
47 | add_var n 1i
48 | endloop
49 | ############# Simple peak search algorithm #############
50 | # As an example, we just determine max and min value
51 | # Many applications will need a more sophisticated algorithm
52 | store_var i 0i ja
53 | loop i < n
54 | array_get b i c
55 | if c > m
56 | copy_var c m
57 | endif
58 | if c < l
59 | copy_var c l
60 | endif
61 | add_var i 1i
62 | endloop
63 | ############# Send measurement data #############
64 | store_var i 0i ja
65 | loop i < n
66 | array_get a i p
67 | array_get b i c
68 | pck_start
69 | pck_add p
70 | pck_add c
71 | pck_add m
72 | pck_add l
73 | pck_end
74 | add_var i 1i
75 | endloop
76 | ############# Decision time #############
77 | #subtract "min" value from "max" to get the relative peak height
78 | sub_var m l
79 | # Enable red LED if peak > nA, otherwise enable green LED (EmStat4M)
80 | if m > 2n
81 | set_gpio 0x1
82 | else
83 | set_gpio 0x2
84 | endif
85 | ############# Turn cell off, even if aborted #############
86 | on_finished:
87 | cell_off
88 |
89 |
--------------------------------------------------------------------------------
/Example_MethodSCRIPTs/MSExample007-EmStatPicoMux16.txt:
--------------------------------------------------------------------------------
1 | e
2 | #############
3 | # MethodSCRIPT example for potentiostats by PalmSens BV - www.palmsens.com
4 | #
5 | #
6 | # Description: This example shows how to run an a repeated CA measurement
7 | # on 5 channels using an EmStat Pico MUX16.
8 | #
9 | # MethodSCRIPT version: 1.3
10 | # Last modified: 01/11/2023
11 | # Applies to: EmStat Pico MUX16 (with EmStat Pico)
12 | # Go to www.palmsens.com/msmanual for the MethodSCRIPT Manual
13 | #
14 | #############
15 | #
16 | # initialize the GPIO pins for use with the MUX16
17 | set_gpio_cfg 0x3FFi 1
18 | set_gpio 0x00i
19 | # Declare some variables to work with
20 | # c: current
21 | # p: potential
22 | # i: inner loop-counter
23 | # j: outer loop-counter
24 | # m: GPIO pins bitMask
25 | var c
26 | var p
27 | var i
28 | var j
29 | var m
30 | # =======================
31 | # Set up the potentiostat
32 | # =======================
33 | set_pgstat_chan 1
34 | set_pgstat_mode 0
35 | set_pgstat_chan 0
36 | set_pgstat_mode 2
37 | set_max_bandwidth 1400
38 | set_cr 1m
39 | set_range_minmax da -1m 1
40 | set_range_minmax ba 100u 100u
41 | set_autoranging ba 10n 1m
42 | set_e -200m
43 | cell_on
44 | # Initialize loop-counter
45 | store_var j 0i ja
46 | # Outer loop, repeat the process 10 times
47 | loop j < 10i
48 | # Inner loop
49 | # (replace 0i with the first channel to use minus one)
50 | store_var i 0i ja
51 | # Loop channels over 1 to 5 (replace `5i` with the last channel to use)
52 | loop i < 5i
53 | # Set appropriate pins to select multiplexer channels.
54 | # First copy `i` since we want to keep it's value for counting.
55 | copy_var i m
56 | # Multiply with a "mask" to switch certain signals.
57 | # Possible values are:
58 | # 0x01 to switch only WE
59 | # 0x10 to switch only RE/CE
60 | # 0x11 to switch both WE and RE/CE
61 | mul_var m 0x11
62 | # Write the pins to the GPIO to switch the Pico MUX16's channel
63 | set_gpio m
64 | # ====================================
65 | # Perform measurement on selected cell
66 | # ====================================
67 | set_e -200m
68 | wait 500m
69 | meas_loop_ca p c 200m 20m 1
70 | pck_start
71 | pck_add p
72 | pck_add c
73 | pck_end
74 | endloop
75 | # ======================================
76 | # End of measurement on selected channel
77 | # ======================================
78 | # Increment inner loop-counter
79 | add_var i 1i
80 | endloop
81 | # Wait approximately 30 seconds (+/-3.2%)
82 | # before starting the next round.
83 | wait 30
84 | # Increment outer loop-counter
85 | add_var j 1i
86 | endloop
87 | on_finished:
88 | cell_off
89 |
90 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2020 PalmSens BV
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 |
7 | - Redistributions of source code must retain the above copyright notice,
8 | this list of conditions and the following disclaimer.
9 | - Neither the name of PalmSens BV nor the names of its contributors
10 | may be used to endorse or promote products derived from this software
11 | without specific prior written permission.
12 | - This license does not release you from any requirement to obtain separate
13 | licenses from 3rd party patent holders to use this software.
14 | - Use of the software either in source or binary form must be connected to,
15 | run on or loaded to an PalmSens BV component.
16 |
17 | DISCLAIMER: THIS SOFTWARE IS PROVIDED BY PALMSENS "AS IS" AND ANY EXPRESS OR
18 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
20 | EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
21 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
23 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
26 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/GettingStarted_MethodSCRIPT_Example_Android.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/GettingStarted_MethodSCRIPT_Example_Android.docx
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/GettingStarted_MethodSCRIPT_Example_Android.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/GettingStarted_MethodSCRIPT_Example_Android.pdf
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | google()
6 | jcenter()
7 |
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.3.1'
11 |
12 | // NOTE: Do not place your application dependencies here; they belong
13 | // in the individual module build.gradle files
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | google()
20 | jcenter()
21 |
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 |
15 |
16 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Mar 28 10:54:36 CET 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
7 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 28
5 | defaultConfig {
6 | applicationId "com.palmsens.methodscriptexample"
7 | minSdkVersion 16
8 | targetSdkVersion 28
9 | versionCode 1
10 | versionName "1.0"
11 |
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 |
14 | }
15 | buildTypes {
16 | release {
17 | minifyEnabled false
18 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
19 | }
20 | }
21 | productFlavors {
22 | }
23 | }
24 |
25 | dependencies {
26 | implementation fileTree(include: ['*.jar'], dir: 'libs')
27 | implementation 'com.android.support:appcompat-v7:28.0.0'
28 | implementation 'com.android.support.constraint:constraint-layout:1.1.3'
29 | testImplementation 'junit:junit:4.12'
30 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
31 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
32 | implementation files('libs/d2xx.jar')
33 | }
34 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/libs/d2xx.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/methodSCRIPTExample/libs/d2xx.jar
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/assets/LSV_on_10kOhm.txt:
--------------------------------------------------------------------------------
1 | e
2 | var c
3 | var p
4 | set_pgstat_mode 3
5 | set_max_bandwidth 200
6 | set_cr 500u
7 | set_e -500m
8 | cell_on
9 | wait 1
10 | meas_loop_lsv p c -500m 500m 50m 100m
11 | pck_start
12 | pck_add p
13 | pck_add c
14 | pck_end
15 | endloop
16 | on_finished:
17 | cell_off
18 |
19 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/assets/SWV_on_10kOhm.txt:
--------------------------------------------------------------------------------
1 | e
2 | var p
3 | var c
4 | var f
5 | var r
6 | set_pgstat_mode 3
7 | set_max_bandwidth 100000
8 | set_cr 500n
9 | set_e -500m
10 | cell_on
11 | wait 1
12 | meas_loop_swv p c f r -500m 500m 5m 25m 10
13 | pck_start
14 | pck_add p
15 | pck_add c
16 | pck_end
17 | endloop
18 | on_finished:
19 | cell_off
20 |
21 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/layout/activity_method_script_example.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
21 |
22 |
37 |
38 |
48 |
49 |
59 |
60 |
72 |
73 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | MethodSCRIPTExample
3 |
4 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/methodSCRIPTExample/src/main/res/xml/device_filter.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 28
5 |
6 | defaultConfig {
7 | applicationId "com.palmsens.msBluetooth"
8 | minSdkVersion 16
9 | targetSdkVersion 28
10 | versionCode 1
11 | versionName "1.0"
12 |
13 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
14 |
15 | }
16 |
17 | buildTypes {
18 | release {
19 | minifyEnabled false
20 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
21 | }
22 | }
23 |
24 | }
25 |
26 | dependencies {
27 | implementation fileTree(include: ['*.jar'], dir: 'libs')
28 | implementation 'com.android.support:appcompat-v7:28.0.0'
29 | implementation 'com.android.support.constraint:constraint-layout:1.1.3'
30 | testImplementation 'junit:junit:4.12'
31 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
32 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
33 | }
34 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/assets/LSV_on_10kOhm.txt:
--------------------------------------------------------------------------------
1 | e
2 | var c
3 | var p
4 | set_pgstat_mode 3
5 | set_max_bandwidth 200
6 | set_cr 500u
7 | set_e -500m
8 | cell_on
9 | wait 1
10 | meas_loop_lsv p c -500m 500m 50m 100m
11 | pck_start
12 | pck_add p
13 | pck_add c
14 | pck_end
15 | endloop
16 | on_finished:
17 | cell_off
18 |
19 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/assets/SWV_on_10kOhm.txt:
--------------------------------------------------------------------------------
1 | e
2 | var p
3 | var c
4 | var f
5 | var r
6 | set_pgstat_mode 3
7 | set_max_bandwidth 100000
8 | set_cr 500n
9 | set_e -500m
10 | cell_on
11 | wait 1
12 | meas_loop_swv p c f r -500m 500m 5m 25m 10
13 | pck_start
14 | pck_add p
15 | pck_add c
16 | pck_end
17 | endloop
18 | on_finished:
19 | cell_off
20 |
21 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/res/layout-land/activity_msbluetooth.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
21 |
22 |
30 |
31 |
41 |
42 |
52 |
53 |
62 |
63 |
73 |
74 |
84 |
85 |
95 |
96 |
106 |
107 |
118 |
119 |
120 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/res/layout/activity_msbluetooth.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
23 |
24 |
34 |
35 |
45 |
46 |
58 |
59 |
70 |
71 |
83 |
84 |
96 |
97 |
109 |
110 |
122 |
123 |
136 |
137 |
138 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Android/msBluetooth/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | MSBluetooth
3 |
4 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/msBluetooth/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':methodSCRIPTExample', ':msBluetooth'
2 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Arduino/GettingStarted_MethodSCRIPT_Example_Arduino.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Arduino/GettingStarted_MethodSCRIPT_Example_Arduino.docx
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Arduino/GettingStarted_MethodSCRIPT_Example_Arduino.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Arduino/GettingStarted_MethodSCRIPT_Example_Arduino.pdf
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Arduino/MathHelperLibrary/LICENSE.md:
--------------------------------------------------------------------------------
1 |
2 | MIT License
3 |
4 | Copyright (c) 2010-2018 Rob Tillaart
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Arduino/MathHelperLibrary/MathHelpers.h:
--------------------------------------------------------------------------------
1 | //
2 | // FILE: MathHelpers.h
3 | // AUTHOR: Rob Tillaart
4 | // DATE: 2018-01-21
5 | //
6 | //
7 | // PUPROSE: misc function for math (print float values in scientific format)
8 | //
9 | #include
10 | #include
11 | #ifndef MATHHELPERS
12 | #define MATHHELPERS
13 |
14 | #define MATHHELPERS_VERSION (F("0.1.0"))
15 |
16 | // global buffer used by all functions
17 | // so we do not need a static buffer in every function
18 | // not usable in multi-threading environments
19 | // results need to be printed/copied asap
20 | char __mathHelperBuffer[16];
21 |
22 |
23 | //////////////////////////////////////////////////
24 | //
25 | // FLOAT REPRESENTATION HELPERS
26 | //
27 | char * sci(double number, int digits)
28 | {
29 | int exponent = 0;
30 | int pos = 0;
31 |
32 | // Handling these costs 13 bytes RAM
33 | // shorten them with N, I, -I ?
34 | if (isnan(number))
35 | {
36 | strcpy(__mathHelperBuffer, "nan");
37 | return __mathHelperBuffer;
38 | }
39 | if (isinf(number))
40 | {
41 | if (number < 0) strcpy(__mathHelperBuffer, "-inf");
42 | strcpy(__mathHelperBuffer, "inf");
43 | return __mathHelperBuffer;
44 | }
45 |
46 | // Handle negative numbers
47 | bool neg = (number < 0.0);
48 | if (neg)
49 | {
50 | __mathHelperBuffer[pos++] = '-';
51 | number = -number;
52 | }
53 |
54 | while (number >= 10.0)
55 | {
56 | number /= 10;
57 | exponent++;
58 | }
59 | while (number < 1 && number != 0.0)
60 | {
61 | number *= 10;
62 | exponent--;
63 | }
64 |
65 | // Round correctly so that print(1.999, 2) prints as "2.00"
66 | double rounding = 0.5;
67 | for (uint8_t i = 0; i < digits; ++i)
68 | {
69 | rounding *= 0.1;
70 | }
71 | number += rounding;
72 | if (number >= 10)
73 | {
74 | exponent++;
75 | number /= 10;
76 | }
77 |
78 |
79 | // Extract the integer part of the number and print it
80 | uint8_t d = (uint8_t)number;
81 | double remainder = number - d;
82 | __mathHelperBuffer[pos++] = d + '0'; // 1 digit before decimal point
83 | if (digits > 0)
84 | {
85 | __mathHelperBuffer[pos++] = '.'; // decimal point TODO:rvdt CONFIG?
86 | }
87 |
88 |
89 | // Extract digits from the remainder one at a time to prevent missing leading zero's
90 | while (digits-- > 0)
91 | {
92 | remainder *= 10.0;
93 | d = (uint8_t)remainder;
94 | __mathHelperBuffer[pos++] = d + '0';
95 | remainder -= d;
96 | }
97 |
98 |
99 | // print exponent
100 | __mathHelperBuffer[pos++] = 'E';
101 | neg = exponent < 0;
102 | if (neg)
103 | {
104 | __mathHelperBuffer[pos++] = '-';
105 | exponent = -exponent;
106 | }
107 | else __mathHelperBuffer[pos++] = '+';
108 |
109 |
110 | // 3 digits for exponent; // needed for double
111 | // d = exponent / 100;
112 | // __mathHelperBuffer[pos++] = d + '0';
113 | // exponent -= d * 100;
114 |
115 | // 2 digits for exponent
116 | d = exponent / 10;
117 | __mathHelperBuffer[pos++] = d + '0';
118 | d = exponent - d*10;
119 | __mathHelperBuffer[pos++] = d + '0';
120 |
121 | __mathHelperBuffer[pos] = '\0';
122 |
123 | return __mathHelperBuffer;
124 | }
125 |
126 | #endif // MATHHELPERS
127 |
128 | // END OF FILE
129 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Arduino/MethodSCRIPTComm/MSCommon.h:
--------------------------------------------------------------------------------
1 | /**
2 | * PalmSens MethodSCRIPT SDK example for Arduino
3 | *
4 | * Commonly used stuff.
5 | *
6 | * ----------------------------------------------------------------------------
7 | *
8 | * \copyright (c) 2019-2021 PalmSens BV
9 | * All rights reserved.
10 | *
11 | * Redistribution and use in source and binary forms, with or without
12 | * modification, are permitted provided that the following conditions are met:
13 | *
14 | * - Redistributions of source code must retain the above copyright notice,
15 | * this list of conditions and the following disclaimer.
16 | * - Neither the name of PalmSens BV nor the names of its contributors
17 | * may be used to endorse or promote products derived from this software
18 | * without specific prior written permission.
19 | * - This license does not release you from any requirement to obtain separate
20 | * licenses from 3rd party patent holders to use this software.
21 | * - Use of the software either in source or binary form must be connected to,
22 | * run on or loaded to an PalmSens BV component.
23 | *
24 | * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY PALMSENS "AS IS" AND ANY EXPRESS OR
25 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
26 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
27 | * EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
30 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
33 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 | *
35 | * ----------------------------------------------------------------------------
36 | */
37 |
38 | #ifndef MSCOMMON_H
39 | #define MSCOMMON_H
40 |
41 | #include
42 |
43 | //////////////////////////////////////////////////////////////////////////////
44 | // Types
45 | //////////////////////////////////////////////////////////////////////////////
46 |
47 | //Templates for communication functions
48 |
49 | //Function in the form of "int function(char c);"
50 | typedef int (*WriteCharFunc)(char c);
51 | //Function in the form of "int function();"
52 | typedef int (*ReadCharFunc)();
53 |
54 | ///
55 | /// Function return codes.
56 | /// Note values < 0 indicate an error
57 | ///
58 | typedef enum _RetCode
59 | {
60 | CODE_VERSION_RESPONSE = 5,
61 | CODE_RESPONSE_BEGIN = 4,
62 | CODE_MEASURING = 3,
63 | CODE_MEASUREMENT_DONE = 2,
64 | CODE_RESPONSE_END = 1,
65 | CODE_OK = 0,
66 | CODE_NULL = -1,
67 | CODE_TIMEOUT = -2,
68 | CODE_OUT_OF_RANGE = -3,
69 | CODE_UNEXPECTED_DATA = -4,
70 | CODE_NOT_IMPLEMENTED = -5,
71 | CODE_ERROR = -1024,
72 | } RetCode;
73 |
74 |
75 | #endif //MSCOMMON_H
76 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/GettingStarted_MethodSCRIPT_Example_C#.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_C#/GettingStarted_MethodSCRIPT_Example_C#.docx
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/GettingStarted_MethodSCRIPT_Example_C#.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_C#/GettingStarted_MethodSCRIPT_Example_C#.pdf
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSCodeExamples.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28307.106
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSConsoleExample", "MSConsoleExample\MSConsoleExample.csproj", "{672B90E2-2022-4D07-8CBB-C08FF82160EE}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSPlotExample", "MSPlotExample\MSPlotExample.csproj", "{89B83A64-B43F-4639-9971-8BEF5BAB26B2}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSEISPlotExample", "MSEISPlotExample\MSEISPlotExample.csproj", "{6EB03DF3-F98D-47BC-BF83-BCCCF594E8EA}"
11 | EndProject
12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSEISConsoleExample", "MSEISConsoleExample\MSEISConsoleExample.csproj", "{5E233B08-F47D-4012-8797-C87775DAA5AA}"
13 | EndProject
14 | Global
15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
16 | Debug|Any CPU = Debug|Any CPU
17 | Release|Any CPU = Release|Any CPU
18 | ReleaseSDK|Any CPU = ReleaseSDK|Any CPU
19 | EndGlobalSection
20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
21 | {672B90E2-2022-4D07-8CBB-C08FF82160EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22 | {672B90E2-2022-4D07-8CBB-C08FF82160EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
23 | {672B90E2-2022-4D07-8CBB-C08FF82160EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
24 | {672B90E2-2022-4D07-8CBB-C08FF82160EE}.Release|Any CPU.Build.0 = Release|Any CPU
25 | {672B90E2-2022-4D07-8CBB-C08FF82160EE}.ReleaseSDK|Any CPU.ActiveCfg = Release|Any CPU
26 | {672B90E2-2022-4D07-8CBB-C08FF82160EE}.ReleaseSDK|Any CPU.Build.0 = Release|Any CPU
27 | {89B83A64-B43F-4639-9971-8BEF5BAB26B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
28 | {89B83A64-B43F-4639-9971-8BEF5BAB26B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
29 | {89B83A64-B43F-4639-9971-8BEF5BAB26B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
30 | {89B83A64-B43F-4639-9971-8BEF5BAB26B2}.Release|Any CPU.Build.0 = Release|Any CPU
31 | {89B83A64-B43F-4639-9971-8BEF5BAB26B2}.ReleaseSDK|Any CPU.ActiveCfg = Release|Any CPU
32 | {89B83A64-B43F-4639-9971-8BEF5BAB26B2}.ReleaseSDK|Any CPU.Build.0 = Release|Any CPU
33 | {6EB03DF3-F98D-47BC-BF83-BCCCF594E8EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34 | {6EB03DF3-F98D-47BC-BF83-BCCCF594E8EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
35 | {6EB03DF3-F98D-47BC-BF83-BCCCF594E8EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
36 | {6EB03DF3-F98D-47BC-BF83-BCCCF594E8EA}.Release|Any CPU.Build.0 = Release|Any CPU
37 | {6EB03DF3-F98D-47BC-BF83-BCCCF594E8EA}.ReleaseSDK|Any CPU.ActiveCfg = Release|Any CPU
38 | {6EB03DF3-F98D-47BC-BF83-BCCCF594E8EA}.ReleaseSDK|Any CPU.Build.0 = Release|Any CPU
39 | {5E233B08-F47D-4012-8797-C87775DAA5AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
40 | {5E233B08-F47D-4012-8797-C87775DAA5AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
41 | {5E233B08-F47D-4012-8797-C87775DAA5AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
42 | {5E233B08-F47D-4012-8797-C87775DAA5AA}.Release|Any CPU.Build.0 = Release|Any CPU
43 | {5E233B08-F47D-4012-8797-C87775DAA5AA}.ReleaseSDK|Any CPU.ActiveCfg = Release|Any CPU
44 | {5E233B08-F47D-4012-8797-C87775DAA5AA}.ReleaseSDK|Any CPU.Build.0 = Release|Any CPU
45 | EndGlobalSection
46 | GlobalSection(SolutionProperties) = preSolution
47 | HideSolutionNode = FALSE
48 | EndGlobalSection
49 | GlobalSection(ExtensibilityGlobals) = postSolution
50 | SolutionGuid = {52B229EF-5EF1-4310-9D67-06344FFDEE11}
51 | EndGlobalSection
52 | EndGlobal
53 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSConsoleExample/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSConsoleExample/MSConsoleExample.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {672B90E2-2022-4D07-8CBB-C08FF82160EE}
8 | Exe
9 | Properties
10 | MSConsoleExample
11 | MSConsoleExample
12 | v4.5.2
13 | 512
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | full
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 | true
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | Always
59 |
60 |
61 | Always
62 |
63 |
64 |
65 |
72 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSConsoleExample/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("EmStatConsoleExample")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("EmStatConsoleExample")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("672b90e2-2022-4d07-8cbb-c08ff82160ee")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSConsoleExample/scripts/LSV_on_10kOhm.txt:
--------------------------------------------------------------------------------
1 | e
2 | var c
3 | var p
4 | set_pgstat_mode 2
5 | set_max_bandwidth 200
6 | set_cr 500u
7 | set_e -500m
8 | cell_on
9 | wait 1
10 | meas_loop_lsv p c -500m 500m 50m 100m
11 | pck_start
12 | pck_add p
13 | pck_add c
14 | pck_end
15 | endloop
16 | on_finished:
17 | cell_off
18 |
19 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSConsoleExample/scripts/SWV_on_10kOhm.txt:
--------------------------------------------------------------------------------
1 | e
2 | var p
3 | var c
4 | var f
5 | var r
6 | set_pgstat_mode 2
7 | set_max_bandwidth 200
8 | set_cr 500u
9 | set_e -500m
10 | cell_on
11 | wait 1
12 | meas_loop_swv p c f r -500m 500m 5m 25m 10
13 | pck_start
14 | pck_add p
15 | pck_add c
16 | pck_end
17 | endloop
18 | cell_off
19 |
20 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSEISConsoleExample/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSEISConsoleExample/MSEISConsoleExample.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {5E233B08-F47D-4012-8797-C87775DAA5AA}
8 | Exe
9 | MSEISConsoleExample
10 | MSEISConsoleExample
11 | v4.6.1
12 | 512
13 | true
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | Always
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSEISConsoleExample/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("ESPicoEISConsoleExample")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("ESPicoEISConsoleExample")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("5e233b08-f47d-4012-8797-c87775daa5aa")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSEISConsoleExample/scripts/EIS_on_Randles_560Ohm_10kOhm_33nF.txt:
--------------------------------------------------------------------------------
1 | e
2 | var h
3 | var r
4 | var j
5 | set_pgstat_chan 1
6 | set_pgstat_mode 0
7 | set_pgstat_chan 0
8 | set_pgstat_mode 3
9 | set_max_bandwidth 200k
10 | set_pot_range 0 0
11 | set_cr 3m
12 | set_autoranging 600n 3m
13 | cell_on
14 | meas_loop_eis h r j 10m 100k 100 41 0
15 | pck_start
16 | pck_add h
17 | pck_add r
18 | pck_add j
19 | pck_end
20 | endloop
21 | on_finished:
22 | cell_off
23 |
24 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSEISPlotExample/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSEISPlotExample/MSEISPlotExample.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {6EB03DF3-F98D-47BC-BF83-BCCCF594E8EA}
8 | WinExe
9 | MSEISPlotExample
10 | MSEISPlotExample
11 | v4.6.1
12 | 512
13 | true
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 | ..\packages\OxyPlot.Core.2.0.0\lib\net45\OxyPlot.dll
38 |
39 |
40 | ..\packages\OxyPlot.WindowsForms.2.0.0\lib\net45\OxyPlot.WindowsForms.dll
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | Form
58 |
59 |
60 | FormEISPlotExample.cs
61 |
62 |
63 |
64 |
65 | FormEISPlotExample.cs
66 |
67 |
68 | ResXFileCodeGenerator
69 | Resources.Designer.cs
70 | Designer
71 |
72 |
73 | True
74 | Resources.resx
75 |
76 |
77 |
78 | SettingsSingleFileGenerator
79 | Settings.Designer.cs
80 |
81 |
82 | True
83 | Settings.settings
84 | True
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 | Always
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSEISPlotExample/Program.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2019-2021 PalmSens BV
3 | All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | - Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 | - Neither the name of PalmSens BV nor the names of its contributors
11 | may be used to endorse or promote products derived from this software
12 | without specific prior written permission.
13 | - This license does not release you from any requirement to obtain separate
14 | licenses from 3rd party patent holders to use this software.
15 | - Use of the software either in source or binary form must be connected to,
16 | run on or loaded to an PalmSens BV component.
17 |
18 | DISCLAIMER: THIS SOFTWARE IS PROVIDED BY PALMSENS "AS IS" AND ANY EXPRESS OR
19 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
21 | EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
22 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | using System;
31 | using System.Windows.Forms;
32 |
33 | namespace EmStatPicoEISPlotExample
34 | {
35 | static class Program
36 | {
37 | ///
38 | /// The main entry point for the application.
39 | ///
40 | [STAThread]
41 | static void Main()
42 | {
43 | Application.EnableVisualStyles();
44 | Application.SetCompatibleTextRenderingDefault(false);
45 | Application.Run(new frmEISPlotExample());
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSEISPlotExample/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("EmStatPicoEISPlotExample")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("EmStatPicoEISPlotExample")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("6eb03df3-f98d-47bc-bf83-bcccf594e8ea")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSEISPlotExample/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace EmStatPicoEISPlotExample.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("EmStatPicoEISPlotExample.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSEISPlotExample/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSEISPlotExample/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace EmStatPicoEISPlotExample.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSEISPlotExample/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSEISPlotExample/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSEISPlotExample/scripts/EIS_on_Randles_560Ohm_10kOhm_33nF.txt:
--------------------------------------------------------------------------------
1 | e
2 | var h
3 | var r
4 | var j
5 | set_pgstat_chan 1
6 | set_pgstat_mode 0
7 | set_pgstat_chan 0
8 | set_pgstat_mode 3
9 | set_max_bandwidth 200k
10 | set_pot_range 0 0
11 | set_cr 3m
12 | set_autoranging 600n 3m
13 | cell_on
14 | meas_loop_eis h r j 10m 100k 100 41 0
15 | pck_start
16 | pck_add h
17 | pck_add r
18 | pck_add j
19 | pck_end
20 | endloop
21 | on_finished:
22 | cell_off
23 |
24 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSPlotExample/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSPlotExample/MSPlotExample.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {89B83A64-B43F-4639-9971-8BEF5BAB26B2}
8 | WinExe
9 | EmStatPicoPlotExample
10 | EmStatPicoPlotExample
11 | v4.6.1
12 | 512
13 | true
14 | true
15 |
16 |
17 |
18 | AnyCPU
19 | true
20 | full
21 | false
22 | bin\Debug\
23 | DEBUG;TRACE
24 | prompt
25 | 4
26 | false
27 |
28 |
29 | AnyCPU
30 | pdbonly
31 | true
32 | bin\Release\
33 | TRACE
34 | prompt
35 | 4
36 | false
37 |
38 |
39 |
40 | ..\packages\OxyPlot.Core.2.0.0\lib\net45\OxyPlot.dll
41 |
42 |
43 | ..\packages\OxyPlot.WindowsForms.2.0.0\lib\net45\OxyPlot.WindowsForms.dll
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Form
60 |
61 |
62 | FormPlotExample.cs
63 |
64 |
65 |
66 |
67 | FormPlotExample.cs
68 |
69 |
70 | ResXFileCodeGenerator
71 | Resources.Designer.cs
72 | Designer
73 |
74 |
75 | True
76 | Resources.resx
77 | True
78 |
79 |
80 |
81 | SettingsSingleFileGenerator
82 | Settings.Designer.cs
83 |
84 |
85 | True
86 | Settings.settings
87 | True
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 | Always
96 |
97 |
98 | Always
99 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSPlotExample/Program.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2019-2021 PalmSens BV
3 | All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | - Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 | - Neither the name of PalmSens BV nor the names of its contributors
11 | may be used to endorse or promote products derived from this software
12 | without specific prior written permission.
13 | - This license does not release you from any requirement to obtain separate
14 | licenses from 3rd party patent holders to use this software.
15 | - Use of the software either in source or binary form must be connected to,
16 | run on or loaded to an PalmSens BV component.
17 |
18 | DISCLAIMER: THIS SOFTWARE IS PROVIDED BY PALMSENS "AS IS" AND ANY EXPRESS OR
19 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
21 | EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
22 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | using System;
31 | using System.Collections.Generic;
32 | using System.Linq;
33 | using System.Threading.Tasks;
34 | using System.Windows.Forms;
35 |
36 | namespace EmStatPicoPlotExample
37 | {
38 | static class Program
39 | {
40 | ///
41 | /// The main entry point for the application.
42 | ///
43 | [STAThread]
44 | static void Main()
45 | {
46 | Application.EnableVisualStyles();
47 | Application.SetCompatibleTextRenderingDefault(false);
48 | Application.Run(new frmPlotExample());
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSPlotExample/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("EmStatPicoPlotExample")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("EmStatPicoPlotExample")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("89b83a64-b43f-4639-9971-8bef5bab26b2")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSPlotExample/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace EmStatPicoPlotExample.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("EmStatPicoPlotExample.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSPlotExample/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSPlotExample/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace EmStatPicoPlotExample.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSPlotExample/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSPlotExample/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSPlotExample/scripts/LSV_on_10kOhm.txt:
--------------------------------------------------------------------------------
1 | e
2 | var c
3 | var p
4 | set_pgstat_mode 2
5 | set_max_bandwidth 200
6 | set_cr 500u
7 | set_e -500m
8 | cell_on
9 | wait 1
10 | meas_loop_lsv p c -500m 500m 50m 100m
11 | pck_start
12 | pck_add p
13 | pck_add c
14 | pck_end
15 | endloop
16 | on_finished:
17 | cell_off
18 |
19 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C#/MSPlotExample/scripts/SWV_on_10kOhm.txt:
--------------------------------------------------------------------------------
1 | e
2 | var p
3 | var c
4 | var f
5 | var r
6 | set_pgstat_mode 2
7 | set_max_bandwidth 200
8 | set_cr 500u
9 | set_e -500m
10 | cell_on
11 | wait 1
12 | meas_loop_swv p c f r -500m 500m 5m 25m 10
13 | pck_start
14 | pck_add p
15 | pck_add c
16 | pck_end
17 | endloop
18 | cell_off
19 |
20 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C/GettingStarted_MethodSCRIPT_Example_C.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_C/GettingStarted_MethodSCRIPT_Example_C.docx
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C/GettingStarted_MethodSCRIPT_Example_C.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_C/GettingStarted_MethodSCRIPT_Example_C.pdf
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C/MethodSCRIPTExample_C/.gitignore:
--------------------------------------------------------------------------------
1 | # Microsoft Visual Studio output
2 | #*.vcxproj.user
3 | #.vs
4 | #Debug
5 | #Release
6 | #x64
7 |
8 | # Makefile output (Windows)
9 | build
10 | example.exe
11 |
12 | # Makefile output (Linux)
13 | build_linux
14 | example
15 |
16 | # Doxygen output
17 | doxygen
18 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C/MethodSCRIPTExample_C/Doxyfile:
--------------------------------------------------------------------------------
1 | PROJECT_NAME = "PalmSens MethodSCRIPT C example project"
2 | OUTPUT_DIRECTORY = doxygen
3 | JAVADOC_AUTOBRIEF = YES
4 | OPTIMIZE_OUTPUT_FOR_C = YES
5 | EXTRACT_STATIC = YES
6 | INPUT = src
7 | FILE_PATTERNS = *.c *.h
8 | EXCLUDE = src/esp_serial_port_linux.c
9 | INLINE_SOURCES = YES
10 | VERBATIM_HEADERS = NO
11 | GENERATE_HTML = YES
12 | SEARCHENGINE = NO
13 | GENERATE_LATEX = NO
14 | HAVE_DOT = YES
15 | CALL_GRAPH = YES
16 | DOT_MULTI_TARGETS = YES
17 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C/MethodSCRIPTExample_C/Makefile:
--------------------------------------------------------------------------------
1 | SOURCES = example.c
2 | SOURCES += palmsens/mscript.c
3 | SOURCES += palmsens/mscript_serial_port_linux.c
4 |
5 | SRCS = $(SOURCES:%.c=src/%.c)
6 | OBJS = $(SOURCES:%.c=build_linux/%.o)
7 | DEPS = $(SOURCES:%.c=build_linux/%.d)
8 |
9 | example: $(OBJS) Makefile
10 | gcc -o $@ $(OBJS)
11 |
12 | build_linux/%.o: src/%.c build_linux/palmsens Makefile
13 | gcc -c -Wall -Wextra -Werror -MMD -o $@ $<
14 |
15 | build_linux/palmsens:
16 | mkdir -p build_linux/palmsens
17 |
18 | .PHONY: clean
19 | clean:
20 | rm -rf build_linux example
21 |
22 | -include $(DEPS)
23 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C/MethodSCRIPTExample_C/Makefile_windows:
--------------------------------------------------------------------------------
1 | SOURCES = example.c
2 | SOURCES += palmsens/mscript.c
3 | SOURCES += palmsens/mscript_serial_port_windows.c
4 |
5 | SRCS = $(SOURCES:%.c=src/%.c)
6 | OBJS = $(SOURCES:%.c=build/%.o)
7 | DEPS = $(SOURCES:%.c=build/%.d)
8 |
9 | example.exe: $(OBJS) Makefile
10 | gcc -o $@ $(OBJS)
11 |
12 | build/%.o: src/%.c build/palmsens Makefile
13 | gcc -c -Wall -Wextra -Werror -MMD -o $@ $<
14 |
15 | build/palmsens:
16 | @if not exist build mkdir build
17 | @if not exist build\palmsens mkdir build\palmsens
18 |
19 | .PHONY: clean
20 | clean:
21 | @if exist example.exe del example.exe
22 | @if exist build rmdir /q /s build
23 |
24 | -include $(DEPS)
25 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C/MethodSCRIPTExample_C/MethodSCRIPT-example.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.31613.86
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MethodSCRIPT-example", "MethodSCRIPT-example.vcxproj", "{A4910053-BB64-4DF3-AB18-5CA2A453E7C0}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Debug|x86 = Debug|x86
12 | Release|x64 = Release|x64
13 | Release|x86 = Release|x86
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {A4910053-BB64-4DF3-AB18-5CA2A453E7C0}.Debug|x64.ActiveCfg = Debug|x64
17 | {A4910053-BB64-4DF3-AB18-5CA2A453E7C0}.Debug|x64.Build.0 = Debug|x64
18 | {A4910053-BB64-4DF3-AB18-5CA2A453E7C0}.Debug|x86.ActiveCfg = Debug|Win32
19 | {A4910053-BB64-4DF3-AB18-5CA2A453E7C0}.Debug|x86.Build.0 = Debug|Win32
20 | {A4910053-BB64-4DF3-AB18-5CA2A453E7C0}.Release|x64.ActiveCfg = Release|x64
21 | {A4910053-BB64-4DF3-AB18-5CA2A453E7C0}.Release|x64.Build.0 = Release|x64
22 | {A4910053-BB64-4DF3-AB18-5CA2A453E7C0}.Release|x86.ActiveCfg = Release|Win32
23 | {A4910053-BB64-4DF3-AB18-5CA2A453E7C0}.Release|x86.Build.0 = Release|Win32
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {66319418-6939-4D8F-A200-91626B82353D}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C/MethodSCRIPTExample_C/make.bat:
--------------------------------------------------------------------------------
1 | mingw32-make -f Makefile_windows %*
2 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C/MethodSCRIPTExample_C/results/.gitignore:
--------------------------------------------------------------------------------
1 | *.csv
2 | *.png
3 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C/MethodSCRIPTExample_C/scripts/example_EIS.mscr:
--------------------------------------------------------------------------------
1 | e
2 | # Declare variables for frequency, and real and imaginary parts of complex result
3 | var f
4 | var r
5 | var j
6 | # Set to channel 0 (Lemo)
7 | set_pgstat_chan 0
8 | # Set mode to high speed
9 | set_pgstat_mode 3
10 | # Enable all supported ranges for current autoranging
11 | set_autoranging ba 1u 1
12 | # Enable all supported ranges for potential autoranging
13 | set_autoranging ab 1p 1
14 | # Turn cell on
15 | cell_on
16 | # Call the EIS loop with 15 mV amplitude, f_start = 200 kHz, f_end = 20 Hz, nrOfPoints = 41, 0 mV DC
17 | meas_loop_eis f r j 15m 200k 20 41 0m
18 | # Add the returned variables to the data package
19 | pck_start
20 | pck_add f
21 | pck_add r
22 | pck_add j
23 | pck_end
24 | endloop
25 | on_finished:
26 | cell_off
27 |
28 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C/MethodSCRIPTExample_C/scripts/example_LSV_10k.mscr:
--------------------------------------------------------------------------------
1 | e
2 | var c
3 | var p
4 | set_pgstat_mode 2
5 | set_max_bandwidth 200
6 | set_autoranging ba 5u 50u
7 | set_range ba 50u
8 | set_e -500m
9 | cell_on
10 | wait 1
11 | meas_loop_lsv p c -500m 500m 10m 100m
12 | pck_start
13 | pck_add p
14 | pck_add c
15 | pck_end
16 | endloop
17 | cell_off
18 |
19 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C/MethodSCRIPTExample_C/scripts/example_SWV_10k.mscr:
--------------------------------------------------------------------------------
1 | e
2 | var p
3 | var c
4 | var f
5 | var r
6 | set_pgstat_mode 2
7 | set_max_bandwidth 100000
8 | set_autoranging ba 5u 60u
9 | set_range ba 60u
10 | set_e -500m
11 | cell_on
12 | wait 1
13 | meas_loop_swv p c f r -500m 500m 5m 25m 10
14 | pck_start
15 | pck_add p
16 | pck_add c
17 | pck_end
18 | endloop
19 | cell_off
20 |
21 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C/MethodSCRIPTExample_C/src/palmsens/mscript_debug_printf.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * MethodSCRIPT debug printf function.
4 | *
5 | * \copyright (c) 2021 PalmSens BV
6 | * All rights reserved.
7 | *
8 | * Redistribution and use in source and binary forms, with or without
9 | * modification, are permitted provided that the following conditions are met:
10 | *
11 | * - Redistributions of source code must retain the above copyright notice,
12 | * this list of conditions and the following disclaimer.
13 | * - Neither the name of PalmSens BV nor the names of its contributors
14 | * may be used to endorse or promote products derived from this software
15 | * without specific prior written permission.
16 | * - This license does not release you from any requirement to obtain separate
17 | * licenses from 3rd party patent holders to use this software.
18 | * - Use of the software either in source or binary form must be connected to,
19 | * run on or loaded to an PalmSens BV component.
20 | *
21 | * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY PALMSENS "AS IS" AND ANY EXPRESS OR
22 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
24 | * EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
27 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 | #pragma once
33 |
34 | #include
35 |
36 | // Uncomment the following line to enable logging in the MethodSCRIPT
37 | // example library:
38 | //#define DEBUG_PRINTF(...) printf(__VA_ARGS__)
39 |
40 |
41 | // Make sure the macro is defined to prevent compiler errors.
42 | #ifndef DEBUG_PRINTF
43 | #define DEBUG_PRINTF(...)
44 | #endif
45 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C/MethodSCRIPTExample_C/src/palmsens/mscript_serial_port.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Serial Port interface.
4 | *
5 | * This is the common header file for the serial interface. This file can be
6 | * included in both Windows and Linux applications. However, the implementation
7 | * for each OS is different.
8 | *
9 | * ----------------------------------------------------------------------------
10 | *
11 | * \copyright (c) 2019-2021 PalmSens BV
12 | * All rights reserved.
13 | *
14 | * Redistribution and use in source and binary forms, with or without
15 | * modification, are permitted provided that the following conditions are met:
16 | *
17 | * - Redistributions of source code must retain the above copyright notice,
18 | * this list of conditions and the following disclaimer.
19 | * - Neither the name of PalmSens BV nor the names of its contributors
20 | * may be used to endorse or promote products derived from this software
21 | * without specific prior written permission.
22 | * - This license does not release you from any requirement to obtain separate
23 | * licenses from 3rd party patent holders to use this software.
24 | * - Use of the software either in source or binary form must be connected to,
25 | * run on or loaded to an PalmSens BV component.
26 | *
27 | * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY PALMSENS "AS IS" AND ANY EXPRESS OR
28 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
29 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
30 | * EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
31 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
32 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
33 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
36 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 | *
38 | * ----------------------------------------------------------------------------
39 | */
40 | #pragma once
41 |
42 | #include
43 | #include
44 |
45 | #if defined(_WIN32) // Windows (32-bit or 64-bit)
46 | #include
47 | typedef HANDLE SerialPortHandle_t;
48 | #define SerialPortHandle_t HANDLE
49 | #define BAD_HANDLE INVALID_HANDLE_VALUE
50 | #elif defined (__linux__) // Linux
51 | typedef int SerialPortHandle_t;
52 | #define SerialPortHandle_t int
53 | #define BAD_HANDLE -1
54 | #else // Other (unsupported) operating system.
55 | #error "Unsupported platform."
56 | #endif
57 |
58 | #ifdef __cplusplus
59 | extern "C" {
60 | #endif
61 |
62 | /**
63 | * Open the serial port connection to the device.
64 | *
65 | * \param serial_port_name name of the serial port, e.g., "COM1" on Windows
66 | * or "/dev/ttyUSB0" on Linux
67 | *
68 | * \return a handle on success, or `BAD_HANDLE` on failure.
69 | */
70 | SerialPortHandle_t mscript_serial_port_open(char const * serial_port_name);
71 |
72 | /**
73 | * Write data to the device.
74 | *
75 | * \param handle a valid handle to the serial port connection
76 | * \param buf a zero-terminated string
77 | *
78 | * \return `true` on success, `false` on failure
79 | */
80 | bool mscript_serial_port_write(SerialPortHandle_t handle, char const * buf);
81 |
82 | /**
83 | * Read a character read from the device.
84 | *
85 | * \param handle a valid handle to the serial port connection
86 | * \param p_character pointer to character where the result will be stored
87 | *
88 | * \return 1 on success, 0 on timeout, -1 on error
89 | */
90 | int mscript_serial_port_read(SerialPortHandle_t handle, char * p_character);
91 |
92 | /**
93 | * Close the serial port.
94 | *
95 | * \param handle a valid handle to the serial port connection
96 | *
97 | * \return `true` on success, `false` on failure
98 | */
99 | bool mscript_serial_port_close(SerialPortHandle_t handle);
100 |
101 | #ifdef __cplusplus
102 | } // extern "C"
103 | #endif
104 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_C/MethodSCRIPTExample_C/src/palmsens/mscript_serial_port_linux.c:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Serial Port interface implementation for Linux.
4 | *
5 | * ----------------------------------------------------------------------------
6 | *
7 | * \copyright (c) 2019-2021 PalmSens BV
8 | * All rights reserved.
9 | *
10 | * Redistribution and use in source and binary forms, with or without
11 | * modification, are permitted provided that the following conditions are met:
12 | *
13 | * - Redistributions of source code must retain the above copyright notice,
14 | * this list of conditions and the following disclaimer.
15 | * - Neither the name of PalmSens BV nor the names of its contributors
16 | * may be used to endorse or promote products derived from this software
17 | * without specific prior written permission.
18 | * - This license does not release you from any requirement to obtain separate
19 | * licenses from 3rd party patent holders to use this software.
20 | * - Use of the software either in source or binary form must be connected to,
21 | * run on or loaded to an PalmSens BV component.
22 | *
23 | * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY PALMSENS "AS IS" AND ANY EXPRESS OR
24 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
26 | * EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
29 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
32 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 | *
34 | * ----------------------------------------------------------------------------
35 | */
36 | #include "mscript_serial_port.h"
37 |
38 | #include
39 | #include
40 | #include
41 | #include
42 | #include
43 | #include
44 | #include
45 | #include "mscript_debug_printf.h"
46 |
47 | SerialPortHandle_t mscript_serial_port_open(char const * serial_port_name)
48 | {
49 | int fd = open(serial_port_name, O_RDWR | O_NOCTTY);
50 | if (fd == -1)
51 | {
52 | DEBUG_PRINTF("Unable to open serial port: %s\n", strerror(errno));
53 | return BAD_HANDLE;
54 | }
55 |
56 | // Get the current configuration of the serial interface
57 | struct termios config;
58 | if (tcgetattr(fd, &config) != 0)
59 | {
60 | DEBUG_PRINTF("Unable to get serial port configuration: %s\n", strerror(errno));
61 | return BAD_HANDLE;
62 | }
63 |
64 | // Set the baudrate for both input and output
65 | cfsetispeed(&config, B230400);
66 | cfsetospeed(&config, B230400);
67 |
68 | // Input flags: Turn off input processing and flow control
69 | config.c_iflag &= ~(IXON | IXOFF | IXANY);
70 |
71 | // Local mode flags: disable echo and put the interface in non-canonical mode (transmit without buffering).
72 | config.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
73 |
74 | // Output flags: Turn off output processing
75 | config.c_oflag &= ~OPOST;
76 |
77 | // Control mode flags: Turn off output processing and act as null-modem
78 | // Clear character size mask, no parity checking,
79 | // No output processing, force 8 bit input
80 | config.c_cflag &= ~(PARENB | CSTOPB | CSIZE | CRTSCTS);
81 | config.c_cflag |= CS8 |CREAD | CLOCAL;
82 |
83 | // Set read timeout
84 | config.c_cc[VMIN] = 0;
85 | config.c_cc[VTIME] = 1; // 100 ms
86 |
87 | if (tcsetattr(fd, TCSANOW, &config) != 0) {
88 | DEBUG_PRINTF("Unable to set serial port configuration: %s\n", strerror(errno));
89 | return BAD_HANDLE;
90 | }
91 |
92 | return fd;
93 | }
94 |
95 | bool mscript_serial_port_close(SerialPortHandle_t handle)
96 | {
97 | assert(handle >= 0);
98 |
99 | int retval = close(handle);
100 | if (retval == -1) {
101 | DEBUG_PRINTF("ERROR: Failed to close serial port: %s\n", strerror(errno));
102 | return false;
103 | }
104 | DEBUG_PRINTF("Closed serial port.\n");
105 | return true;
106 | }
107 |
108 | bool mscript_serial_port_write(SerialPortHandle_t handle, char const * buf)
109 | {
110 | assert(handle >= 0);
111 | assert(buf != NULL);
112 |
113 | bool success = true;
114 | size_t n = strlen(buf);
115 | ssize_t bytes_written = write(handle, buf, n);
116 | if (bytes_written < (ssize_t)n) {
117 | if (bytes_written == -1) {
118 | DEBUG_PRINTF("ERROR: Failed to write to device: %s\n", strerror(errno));
119 | } else {
120 | DEBUG_PRINTF("ERROR: Not all bytes were written to the device.\n");
121 | }
122 | success = false;
123 | }
124 | return success;
125 | }
126 |
127 | int mscript_serial_port_read(SerialPortHandle_t handle, char * p_character)
128 | {
129 | assert(handle >= 0);
130 | assert(p_character != NULL);
131 |
132 | ssize_t bytes_read = read(handle, p_character, 1);
133 | if (bytes_read == -1) {
134 | if (errno == EAGAIN) { // timeout
135 | return 0;
136 | }
137 | DEBUG_PRINTF("ERROR: Failed to read from device: %s\n", strerror(errno));
138 | return -1;
139 | }
140 | return (int)bytes_read; // 0 or 1
141 | }
142 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Python/GettingStarted_MethodSCRIPT_Example_Python.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Python/GettingStarted_MethodSCRIPT_Example_Python.docx
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Python/GettingStarted_MethodSCRIPT_Example_Python.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_Python/GettingStarted_MethodSCRIPT_Example_Python.pdf
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Python/MethodSCRIPTExample_Python/palmsens/serial.py:
--------------------------------------------------------------------------------
1 | """
2 | PalmSens Serial Port (UART) interface
3 |
4 | This module implements the serial interface to the PalmSens instrument.
5 |
6 | This module uses the "pyserial" module, which must be installed before running
7 | this code. See https://pypi.org/project/pyserial/ for more information.
8 |
9 | -------------------------------------------------------------------------------
10 | Copyright (c) 2021 PalmSens BV
11 | All rights reserved.
12 |
13 | Redistribution and use in source and binary forms, with or without
14 | modification, are permitted provided that the following conditions are met:
15 |
16 | - Redistributions of source code must retain the above copyright notice,
17 | this list of conditions and the following disclaimer.
18 | - Neither the name of PalmSens BV nor the names of its contributors
19 | may be used to endorse or promote products derived from this software
20 | without specific prior written permission.
21 | - This license does not release you from any requirement to obtain separate
22 | licenses from 3rd party patent holders to use this software.
23 | - Use of the software either in source or binary form must be connected to,
24 | run on or loaded to an PalmSens BV component.
25 |
26 | DISCLAIMER: THIS SOFTWARE IS PROVIDED BY PALMSENS "AS IS" AND ANY EXPRESS OR
27 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
28 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
29 | EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
32 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
35 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 | """
37 |
38 | # Standard library imports
39 | import logging
40 |
41 | # Third-party imports
42 | import serial
43 | import serial.tools.list_ports
44 |
45 |
46 | LOG = logging.getLogger(__name__)
47 |
48 |
49 | def _is_mscript_device(port_description: str):
50 | """Check if the specified port is a known MethodSCRIPT device."""
51 | # NOTES:
52 | # - Since the EmStat Pico uses a generic FTDI USB-to-Serial chip,
53 | # it is identified by Windows as "USB Serial Port". This is the
54 | # text to look for when using the auto-detection feature. Note
55 | # that an EmStat Pico or Sensit BT cannot be auto-detected if
56 | # there are also other devices connected that use this name.
57 | # - An EmStat4 device in bootloader mode would be identified as
58 | # 'EmStat4 Bootloader', but we only want to connect to devices
59 | # that can run MethodSCRIPTs, so we do not include that here.
60 | return (port_description == 'EmStat4' or
61 | port_description.startswith('ESPicoDev') or
62 | port_description.startswith('SensitBT') or
63 | port_description.startswith('SensitSmart') or
64 | # ^ Above names are used in Linux
65 | # v Below names are used in Windows
66 | port_description.startswith('EmStat4 LR (COM') or
67 | port_description.startswith('EmStat4 HR (COM') or
68 | port_description.startswith('MultiEmStat4 LR (COM') or
69 | port_description.startswith('MultiEmStat4 HR (COM') or
70 | port_description.startswith('USB Serial Port'))
71 |
72 |
73 | def auto_detect_port():
74 | """Auto-detect serial communication port.
75 |
76 | This works by searching for an available port with the correct name.
77 | If exactly one port matches, this port will be returned. If there
78 | are either no or multiple matches, the auto-detection fails and None
79 | is returned instead. In that case, the user must explicitly specify
80 | which port to connect to (or disconnect unneeded devices with the
81 | same port name).
82 | """
83 | LOG.info('Auto-detecting serial communication port.')
84 | # Get the available ports.
85 | ports = serial.tools.list_ports.comports(include_links=False)
86 | candidates = []
87 | for port in ports:
88 | LOG.debug('Found port: %s', port.description)
89 | if _is_mscript_device(port.description):
90 | candidates.append(port.device)
91 |
92 | if len(candidates) != 1:
93 | LOG.error('%d candidates found. Auto-detect failed.', len(candidates))
94 | raise RuntimeError('Auto-detection of serial port failed.')
95 |
96 | LOG.info('Exactly one candidate found. Using %s.', candidates[0])
97 | return candidates[0]
98 |
99 |
100 | class Serial():
101 | """Serial communication interface for EmStat Pico."""
102 |
103 | def __init__(self, port, timeout):
104 | self.connection = serial.Serial(port=None, baudrate=230400, timeout=timeout)
105 | self.connection.port = port
106 |
107 | def __enter__(self):
108 | if not self.connection.is_open:
109 | self.open()
110 | return self
111 |
112 | def __exit__(self, exc_type, exc_value, traceback):
113 | self.close()
114 |
115 | def open(self):
116 | self.connection.open()
117 |
118 | def close(self):
119 | self.connection.close()
120 |
121 | def write(self, data: bytes):
122 | self.connection.write(data)
123 |
124 | def readline(self) -> bytes:
125 | return self.connection.readline()
126 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Python/MethodSCRIPTExample_Python/requirements.txt:
--------------------------------------------------------------------------------
1 | matplotlib >= 3.5.0
2 | numpy >= 1.21.1
3 | pyserial >= 3.5
4 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Python/MethodSCRIPTExample_Python/revision_history.txt:
--------------------------------------------------------------------------------
1 | Revision History
2 | 1.0:
3 | - Initial release
4 |
5 | 1.1:
6 | - Added way of enabling verbose printing of data
7 | - Added parsing of multiple curves in one measurement
8 | - CheckFileExistAndRename now supports any suffix, not just .dat
9 | - Added support for parsing integer values
10 | - Added option to export to CSV
11 | - Added support for more value types
12 | - Added more VT support functions:
13 | GetVarType, GetVarTypeCols, GetValueMatrixWithVT, ParseResultFileWithVT
14 | - Removed hibernate as this is now deprecated. Hibernation is now done through MethodSCRIPT.
15 |
16 | 1.2:
17 | - ...
18 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Python/MethodSCRIPTExample_Python/scripts/example_advanced_swv_es4.mscr:
--------------------------------------------------------------------------------
1 | e
2 | var c
3 | var p
4 | var f
5 | var r
6 | var i
7 | store_var i 0i ja
8 | set_pgstat_chan 0
9 | set_pgstat_mode 3
10 | set_max_bandwidth 40
11 | set_range_minmax da -300m 400m
12 | set_range ba 100u
13 | set_autoranging ba 1n 100u
14 | cell_on
15 | #Equilibrate at -300mV and autorange for 2s prior to SWV
16 | meas_loop_ca p c -300m 100m 2
17 | endloop
18 | # Measure SWV: E, I, I_fwd, I_rev, E_begin, E_end, E_step, E_amp, freq
19 | meas_loop_swv p c f r -300m 300m 5m 50m 5
20 | pck_start
21 | pck_add p
22 | pck_add c
23 | pck_add f
24 | pck_add r
25 | pck_end
26 | endloop
27 | # Reverse SWV
28 | meas_loop_swv p c f r 300m -300m 5m 50m 5
29 | pck_start
30 | pck_add p
31 | pck_add c
32 | pck_add f
33 | pck_add r
34 | pck_end
35 | endloop
36 | on_finished:
37 | cell_off
38 |
39 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Python/MethodSCRIPTExample_Python/scripts/example_advanced_swv_espico.mscr:
--------------------------------------------------------------------------------
1 | e
2 | var c
3 | var p
4 | var f
5 | var r
6 | var i
7 | store_var i 0i ja
8 | set_pgstat_chan 1
9 | set_pgstat_mode 0
10 | set_pgstat_chan 0
11 | set_pgstat_mode 2
12 | set_max_bandwidth 40
13 | set_range_minmax da -300m 400m
14 | set_range ba 100u
15 | set_autoranging ba 1n 100u
16 | cell_on
17 | #Equilibrate at -300mV and autorange for 2s prior to SWV
18 | meas_loop_ca p c -300m 100m 2
19 | endloop
20 | # Measure SWV: E, I, I_fwd, I_rev, E_begin, E_end, E_step, E_amp, freq
21 | meas_loop_swv p c f r -300m 300m 10m 50m 2
22 | pck_start
23 | pck_add p
24 | pck_add c
25 | pck_add f
26 | pck_add r
27 | pck_end
28 | endloop
29 | # Reverse SWV
30 | meas_loop_swv p c f r 300m -300m 10m 50m 2
31 | pck_start
32 | pck_add p
33 | pck_add c
34 | pck_add f
35 | pck_add r
36 | pck_end
37 | endloop
38 | on_finished:
39 | cell_off
40 |
41 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Python/MethodSCRIPTExample_Python/scripts/example_cv.mscr:
--------------------------------------------------------------------------------
1 | e
2 | var c
3 | var p
4 | set_pgstat_mode 2
5 | set_max_bandwidth 40
6 | set_range ba 100u
7 | set_autoranging ba 1n 100u
8 | set_e 0m
9 | cell_on
10 | #autorange for 1s prior to CV
11 | meas_loop_ca p c 0m 100m 3
12 | endloop
13 | # E_res, I_res, E_begin, E_vtx1, E_vtx2, E_step, scan_rate
14 | meas_loop_cv p c 0m 500m -500m 10m 100m
15 | pck_start
16 | pck_add p
17 | pck_add c
18 | pck_end
19 | endloop
20 | on_finished:
21 | cell_off
22 |
23 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Python/MethodSCRIPTExample_Python/scripts/example_eis.mscr:
--------------------------------------------------------------------------------
1 | e
2 | # Declare variables for frequency, and real and imaginary parts of complex result
3 | var f
4 | var r
5 | var j
6 | # Set to channel 0 (Lemo)
7 | set_pgstat_chan 0
8 | # Set mode to high speed
9 | set_pgstat_mode 3
10 | # Enable all supported ranges for current autoranging
11 | set_autoranging ba 1p 1
12 | # Enable all supported ranges for potential autoranging
13 | set_autoranging ab 1p 1
14 | # Turn cell on
15 | cell_on
16 | # Call the EIS loop with 15 mV amplitude, f_start = 200 kHz, f_end = 20 Hz, nrOfPoints = 41, 0 mV DC
17 | meas_loop_eis f r j 15m 200k 20 41 0m
18 | # Add the returned variables to the data package
19 | pck_start
20 | pck_add f
21 | pck_add r
22 | pck_add j
23 | pck_end
24 | endloop
25 | on_finished:
26 | cell_off
27 |
28 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Python/MethodSCRIPTExample_Python/tox.ini:
--------------------------------------------------------------------------------
1 | [pycodestyle]
2 | max-line-length = 100
3 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_Python/MethodSCRIPT_Example_Python.code-workspace:
--------------------------------------------------------------------------------
1 | // Project file for Visual Studio Code.
2 | // See https://code.visualstudio.com/
3 | {
4 | "folders": [
5 | {
6 | "path": "MethodSCRIPTExample_Python"
7 | }
8 | ],
9 | "settings": {
10 | "editor.detectIndentation": false,
11 | "editor.tabSize": 4,
12 | "files.exclude": {
13 | "**/__pycache__": true,
14 | "**/venv*": true,
15 | },
16 | },
17 | "extensions": {
18 | "recommendations": [
19 | "ms-python.python",
20 | "ms-python.vscode-pylance"
21 | ]
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/.com.greenworldsoft.syncfolderspro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_iOS/.com.greenworldsoft.syncfolderspro
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /workspace.xml
3 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/.idea/MethodSCRIPTExample_Swift.iml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/.idea/dictionaries/evertwiesenekker.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | hscr
5 | methodscript
6 | underload
7 | unhexed
8 |
9 |
10 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/.idea/xcode.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/GettingStarted_MethodSCRIPT_Example_iOS.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_iOS/GettingStarted_MethodSCRIPT_Example_iOS.docx
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/GettingStarted_MethodSCRIPT_Example_iOS.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_iOS/GettingStarted_MethodSCRIPT_Example_iOS.pdf
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS.xcodeproj/project.xcworkspace/xcuserdata/evertwiesenekker.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS.xcodeproj/project.xcworkspace/xcuserdata/evertwiesenekker.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS.xcodeproj/project.xcworkspace/xcuserdata/evertwiesenekker.xcuserdatad/xcdebugger/Expressions.xcexplist:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
7 |
8 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS.xcodeproj/project.xcworkspace/xcuserdata/evertwiesenekker.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS.xcodeproj/project.xcworkspace/xcuserdata/mallepietje.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS.xcodeproj/project.xcworkspace/xcuserdata/mallepietje.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS.xcodeproj/project.xcworkspace/xcuserdata/mallepietje.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS.xcodeproj/xcuserdata/evertwiesenekker.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
9 |
21 |
22 |
23 |
25 |
37 |
38 |
39 |
41 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS.xcodeproj/xcuserdata/evertwiesenekker.xcuserdatad/xcschemes/MethodSCRIPTExample_Swift.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
14 |
20 |
21 |
22 |
23 |
24 |
29 |
30 |
31 |
32 |
42 |
44 |
50 |
51 |
52 |
53 |
59 |
60 |
62 |
63 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS.xcodeproj/xcuserdata/evertwiesenekker.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | MethodSCRIPTExample_Swift.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 | MethodSCRIPTExample_Swift.xcscheme_^#shared#^_
13 |
14 | orderHint
15 | 1
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS.xcodeproj/xcuserdata/mallepietje.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
9 |
21 |
22 |
23 |
25 |
37 |
38 |
39 |
41 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS.xcodeproj/xcuserdata/mallepietje.xcuserdatad/xcschemes/MethodSCRIPTExample_Swift.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
8 |
14 |
15 |
16 |
17 |
18 |
22 |
23 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS.xcodeproj/xcuserdata/mallepietje.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | MethodSCRIPTExample_Swift.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // MethodSCRIPTExample_Swift
4 | /*
5 | Copyright (c) 2019-2021 PalmSens BV
6 | All rights reserved.
7 |
8 | Redistribution and use in source and binary forms, with or without
9 | modification, are permitted provided that the following conditions are met:
10 |
11 | - Redistributions of source code must retain the above copyright notice,
12 | this list of conditions and the following disclaimer.
13 | - Neither the name of PalmSens BV nor the names of its contributors
14 | may be used to endorse or promote products derived from this software
15 | without specific prior written permission.
16 | - This license does not release you from any requirement to obtain separate
17 | licenses from 3rd party patent holders to use this software.
18 | - Use of the software either in source or binary form must be connected to,
19 | run on or loaded to an PalmSens BV component.
20 |
21 | DISCLAIMER: THIS SOFTWARE IS PROVIDED BY PALMSENS "AS IS" AND ANY EXPRESS OR
22 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
24 | EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
27 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 | import UIKit
34 |
35 | @UIApplicationMain
36 | class AppDelegate: UIResponder, UIApplicationDelegate {
37 |
38 |
39 |
40 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
41 | // Override point for customization after application launch.
42 | return true
43 | }
44 |
45 | // MARK: UISceneSession Lifecycle
46 |
47 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
48 | // Called when a new scene session is being created.
49 | // Use this method to select a configuration to create the new scene with.
50 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
51 | }
52 |
53 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) {
54 | // Called when the user discards a scene session.
55 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
56 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
57 | }
58 |
59 |
60 | }
61 |
62 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "PalmSensLogo40x40.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "PalmSensLogo60x60.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "idiom" : "iphone",
17 | "size" : "29x29",
18 | "scale" : "2x"
19 | },
20 | {
21 | "idiom" : "iphone",
22 | "size" : "29x29",
23 | "scale" : "3x"
24 | },
25 | {
26 | "idiom" : "iphone",
27 | "size" : "40x40",
28 | "scale" : "2x"
29 | },
30 | {
31 | "idiom" : "iphone",
32 | "size" : "40x40",
33 | "scale" : "3x"
34 | },
35 | {
36 | "size" : "60x60",
37 | "idiom" : "iphone",
38 | "filename" : "PalmSensLogo120x120.png",
39 | "scale" : "2x"
40 | },
41 | {
42 | "size" : "60x60",
43 | "idiom" : "iphone",
44 | "filename" : "PalmSensLogo180x180.png",
45 | "scale" : "3x"
46 | },
47 | {
48 | "idiom" : "ipad",
49 | "size" : "20x20",
50 | "scale" : "1x"
51 | },
52 | {
53 | "idiom" : "ipad",
54 | "size" : "20x20",
55 | "scale" : "2x"
56 | },
57 | {
58 | "idiom" : "ipad",
59 | "size" : "29x29",
60 | "scale" : "1x"
61 | },
62 | {
63 | "idiom" : "ipad",
64 | "size" : "29x29",
65 | "scale" : "2x"
66 | },
67 | {
68 | "idiom" : "ipad",
69 | "size" : "40x40",
70 | "scale" : "1x"
71 | },
72 | {
73 | "idiom" : "ipad",
74 | "size" : "40x40",
75 | "scale" : "2x"
76 | },
77 | {
78 | "idiom" : "ipad",
79 | "size" : "76x76",
80 | "scale" : "1x"
81 | },
82 | {
83 | "idiom" : "ipad",
84 | "size" : "76x76",
85 | "scale" : "2x"
86 | },
87 | {
88 | "idiom" : "ipad",
89 | "size" : "83.5x83.5",
90 | "scale" : "2x"
91 | },
92 | {
93 | "idiom" : "ios-marketing",
94 | "size" : "1024x1024",
95 | "scale" : "1x"
96 | }
97 | ],
98 | "info" : {
99 | "version" : 1,
100 | "author" : "xcode"
101 | }
102 | }
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS/Assets.xcassets/AppIcon.appiconset/PalmSensLogo120x120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS/Assets.xcassets/AppIcon.appiconset/PalmSensLogo120x120.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS/Assets.xcassets/AppIcon.appiconset/PalmSensLogo180x180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS/Assets.xcassets/AppIcon.appiconset/PalmSensLogo180x180.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS/Assets.xcassets/AppIcon.appiconset/PalmSensLogo40x40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS/Assets.xcassets/AppIcon.appiconset/PalmSensLogo40x40.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS/Assets.xcassets/AppIcon.appiconset/PalmSensLogo60x60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PalmSens/MethodSCRIPT_Examples/57622e5b293c047e8102f9cb9db688ea81d4bf99/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS/Assets.xcassets/AppIcon.appiconset/PalmSensLogo60x60.png
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS/Extensions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Extensions.swift
3 | // MethodSCRIPTExample_Swift
4 | /*
5 | Copyright (c) 2019-2021 PalmSens BV
6 | All rights reserved.
7 |
8 | Redistribution and use in source and binary forms, with or without
9 | modification, are permitted provided that the following conditions are met:
10 |
11 | - Redistributions of source code must retain the above copyright notice,
12 | this list of conditions and the following disclaimer.
13 | - Neither the name of PalmSens BV nor the names of its contributors
14 | may be used to endorse or promote products derived from this software
15 | without specific prior written permission.
16 | - This license does not release you from any requirement to obtain separate
17 | licenses from 3rd party patent holders to use this software.
18 | - Use of the software either in source or binary form must be connected to,
19 | run on or loaded to an PalmSens BV component.
20 |
21 | DISCLAIMER: THIS SOFTWARE IS PROVIDED BY PALMSENS "AS IS" AND ANY EXPRESS OR
22 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
24 | EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
27 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 | import Foundation
34 |
35 | extension RangeReplaceableCollection where Element: Equatable {
36 | @discardableResult
37 | mutating func appendIfNotContains(_ element: Element) -> (appended: Bool, memberAfterAppend: Element) {
38 | if let index = firstIndex(of: element) {
39 | return (false, self[index])
40 | } else {
41 | append(element)
42 | return (true, element)
43 | }
44 | }
45 | }
46 |
47 | extension String {
48 | var withEscapedNewlines: String {
49 | self.replacingOccurrences(of: "\n", with: "\\n")
50 | }
51 | subscript (bounds: CountableClosedRange) -> String {
52 | let start = index(startIndex, offsetBy: bounds.lowerBound)
53 | let end = index(startIndex, offsetBy: bounds.upperBound)
54 | return String(self[start...end])
55 | }
56 |
57 | subscript (i: Int) -> String {
58 | return self[i ..< i + 1]
59 | }
60 |
61 | subscript (bounds: CountableRange) -> String {
62 | let start = index(startIndex, offsetBy: bounds.lowerBound)
63 | let end = index(startIndex, offsetBy: bounds.upperBound)
64 | return String(self[start..
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIcons
10 |
11 | CFBundleIcons~ipad
12 |
13 | CFBundleIdentifier
14 | $(PRODUCT_BUNDLE_IDENTIFIER)
15 | CFBundleInfoDictionaryVersion
16 | 6.0
17 | CFBundleName
18 | $(PRODUCT_NAME)
19 | CFBundlePackageType
20 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
21 | CFBundleShortVersionString
22 | 1.0
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | NSBluetoothAlwaysUsageDescription
28 | This app uses Bluetooth
29 | UIApplicationSceneManifest
30 |
31 | UIApplicationSupportsMultipleScenes
32 |
33 | UISceneConfigurations
34 |
35 | UIWindowSceneSessionRoleApplication
36 |
37 |
38 | UISceneConfigurationName
39 | Default Configuration
40 | UISceneDelegateClassName
41 | $(PRODUCT_MODULE_NAME).SceneDelegate
42 |
43 |
44 |
45 |
46 | UILaunchStoryboardName
47 | LaunchScreen
48 | UIRequiredDeviceCapabilities
49 |
50 | armv7
51 |
52 | UISupportedInterfaceOrientations
53 |
54 | UIInterfaceOrientationPortrait
55 | UIInterfaceOrientationLandscapeLeft
56 | UIInterfaceOrientationLandscapeRight
57 |
58 | UISupportedInterfaceOrientations~ipad
59 |
60 | UIInterfaceOrientationPortrait
61 | UIInterfaceOrientationPortraitUpsideDown
62 | UIInterfaceOrientationLandscapeLeft
63 | UIInterfaceOrientationLandscapeRight
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/MethodSCRIPTExample_iOS/MethodSCRIPTExample_iOS/SceneDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.swift
3 | // MethodSCRIPTExample_Swift
4 | /*
5 | Copyright (c) 2019-2021 PalmSens BV
6 | All rights reserved.
7 |
8 | Redistribution and use in source and binary forms, with or without
9 | modification, are permitted provided that the following conditions are met:
10 |
11 | - Redistributions of source code must retain the above copyright notice,
12 | this list of conditions and the following disclaimer.
13 | - Neither the name of PalmSens BV nor the names of its contributors
14 | may be used to endorse or promote products derived from this software
15 | without specific prior written permission.
16 | - This license does not release you from any requirement to obtain separate
17 | licenses from 3rd party patent holders to use this software.
18 | - Use of the software either in source or binary form must be connected to,
19 | run on or loaded to an PalmSens BV component.
20 |
21 | DISCLAIMER: THIS SOFTWARE IS PROVIDED BY PALMSENS "AS IS" AND ANY EXPRESS OR
22 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
24 | EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
27 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 | import UIKit
34 | import SwiftUI
35 |
36 | class SceneDelegate: UIResponder, UIWindowSceneDelegate {
37 |
38 | var window: UIWindow?
39 |
40 | var communicationObject = CommunicationObject()
41 |
42 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
43 |
44 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
45 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
46 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
47 |
48 | // Create the SwiftUI view that provides the window contents.
49 | let contentView = ContentView()
50 |
51 | // Use a UIHostingController as window root view controller.
52 | if let windowScene = scene as? UIWindowScene {
53 | let window = UIWindow(windowScene: windowScene)
54 | window.rootViewController = UIHostingController(rootView: contentView.environmentObject(communicationObject))
55 | self.window = window
56 | window.makeKeyAndVisible()
57 | }
58 | }
59 |
60 | func sceneDidDisconnect(_ scene: UIScene) {
61 | // Called as the scene is being released by the system.
62 | // This occurs shortly after the scene enters the background, or when its session is discarded.
63 | // Release any resources associated with this scene that can be re-created the next time the scene connects.
64 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead).
65 | }
66 |
67 | func sceneDidBecomeActive(_ scene: UIScene) {
68 | // Called when the scene has moved from an inactive state to an active state.
69 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
70 | }
71 |
72 | func sceneWillResignActive(_ scene: UIScene) {
73 | // Called when the scene will move from an active state to an inactive state.
74 | // This may occur due to temporary interruptions (ex. an incoming phone call).
75 | }
76 |
77 | func sceneWillEnterForeground(_ scene: UIScene) {
78 | // Called as the scene transitions from the background to the foreground.
79 | // Use this method to undo the changes made on entering the background.
80 | }
81 |
82 | func sceneDidEnterBackground(_ scene: UIScene) {
83 | // Called as the scene transitions from the foreground to the background.
84 | // Use this method to save data, release shared resources, and store enough scene-specific state information
85 | // to restore the scene back to its current state.
86 | }
87 |
88 |
89 | }
90 |
91 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [License](https://github.com/palmsens/emstatpico/blob/master/LICENSE)
2 |
3 | # Implementing MethodSCRIPT 1.3 - code examples
4 | This repository contains the following code examples to use with the [EmStat Pico potentiostat module](http://www.emstatpico.com):
5 |
6 | 1. MethodSCRIPTExample_Android
7 | 1. MethodSCRIPTExample_Arduino
8 | 1. MethodSCRIPTExample_C
9 | 1. MethodSCRIPTExample_Python
10 | 1. MethodSCRIPTExample_iOS
11 | 1. MethodSCRIPTExamples_C#
12 |
13 | The following examples support the EmStat4 as well as the EmStat Pico:
14 |
15 | 1. MethodSCRIPTExample_Arduino
16 | 1. MethodSCRIPTExample_C
17 | 1. MethodSCRIPTExample_Python
18 |
19 | **Each folder contains a document with more information about how to use the example.**
20 |
21 | ## MethodSCRIPTExample_Android
22 | This project demonstrates basic communication with the EmStat Pico from an Android device. The examples show how to connect to the device **(using USB and Bluetooth)**, send a MethodSCRIPT to the device, run measurements on the device, read and parse the measurement data packages from the device using Java.
23 |
24 | ## MethodSCRIPTExample_Arduino
25 | The arduino example MethodSCRIPTExample.ino demonstrates basic communication with a MethodSCRIPT device (EmStat4 or EmStat Pico) through Arduino MKR ZERO using the MethodSCRIPT SDK (C libraries). The example allows the user to start measurements from a Windows PC connected to the Arduino through USB.
26 |
27 | ## MethodSCRIPTExample_C
28 | The example MethodSCRIPTExample.c found in the /MethodSCRIPTExample_C folder demonstrates basic communication with a MethodSCRIPT device (EmStat4 or EmStat Pico). The example allows the user to start measurements on the EmStat Pico from a Windows or Linux PC using a simple C program which makes use of the MethodSCRIPT SDK (C libraries).
29 |
30 | ## MethodSCRIPTExample_Python
31 | The example MSConsoleExample.py found in the /MethodSCRIPTExample_Python folder demonstrates basic communication with a MethodSCRIPT device (EmStat4 or EmStat Pico) using Python.
32 | * The files `serial.py`, `mscript.py` and `instrument.py` contain a custom library with some commonly used functions for communication with MethodSCRIPT devices.
33 | * The console_example.py example is a barebones example without a plotting option. It starts a measurement script and parses the measurement response into a CSV format.
34 | * The plot_advanced_swv.py example demonstrates the common electrochemical technique "Square Wave Voltammetry". It also showcases some advanced plotting options such as plotting multiple curves on the same axis.
35 | * The plot_cv.py example demonstrates the common electrochemical technique "Cyclic Voltammetry" and plots the resulting voltammogram.
36 | * The plot_eis.py example demonstrates the Electrochemical Impedance Spectroscopy technique and plots the resulting Nyquist and Bode plots.
37 |
38 | ## MethodSCRIPTExample_iOS
39 | The example in the ‘MethodSCRIPTExamples_iOS’ folder demonstrates basic communication with the EmStat Pico from an iOS device using Bluetooth Low Energy (BLE). The example shows how to connect to an EmStat Pico, send a MethodSCRIPT and read and parse the measurement data packages using Apple’s programming language Swift. The UI was built with SwiftUI.
40 |
41 | ## MethodSCRIPTExamples_C#
42 | The examples in the /MethodSCRIPTExamples_C# folder demonstrate basic communication with the EmStat Pico from a windows PC using C#. The examples show how to connect to the device, send MethodSCRIPTs to the device, run measurements on the device, read and parse the measurement data packages from the device and using simple plot objects to plot the data.
43 |
44 | Included:
45 |
46 | **Example 1: Basic Console Example (MSConsoleExample)**
47 | This example demonstrates how to implement USB serial communication to
48 | * Establish a connection with the device
49 | * Write a MethodSCRIPT to the device
50 | * Read and parse measurement data packages from the device
51 | This does not include error handling, method validation etc.
52 |
53 | **Example 2: Plot Example (MSPlotExample)**
54 | In addition to the basic communications as in the above example, this plot example demonstrates how to implement the plot object (using the OxyPlot library for windows forms).
55 |
56 | **Example 3: EIS Console Example (MSEISExample)**
57 | This console example demonstrates sending, receiving and parsing data for a simple EIS measurement.
58 |
59 | **Example 4: EIS Plot Example (MSEISPlotExample)**
60 | This example demonstrates the implementation of OxyPlot to show the EIS measurement response on Nyquist and Bode plots.
61 |
62 | # Support #
63 | The EmStat Pico module is a product from PalmSens BV and Analog Devices Inc.
64 | All support questions should be posted in our [EngineerZone forums](https://ez.analog.com/partnerzone/palmsens/).
65 |
66 |
--------------------------------------------------------------------------------