-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
dev_notes.txt
80 lines (55 loc) · 3.84 KB
/
dev_notes.txt
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
* To enable Visual Studio Code debugger to have debug access to another thread
add this to the start of `worker_DAQ._do_work()` and `worker_jobs._do_work()`
if self.debug:
import pydevd
pydevd.settrace(suspend=False)
* SNIPPET: To quickly enable FFTW running inside numpy and (partially) scipy
import pyfftw
np.fft = pyfftw.interfaces.numpy_fft # Monkey patch fftpack
pyfftw.interfaces.cache.enable() # Turn on cache for optimum performance
* Arduino lockin-amplifier commands
V1.0.0_VSCODE
-------------
command reply Remark
--------------------------------------------------------------------------------
on Start lock-in
_on Start lock-in and reset timer to 0
off Stop lock-in
id? ASCII ["Arduino, Alia\n"] Identity string
mcu? ASCII [...] Microcontroller info
const? ASCII [...] Lock-in constants
_freq #.### ASCII [(double) obtained freq] Set requested frequency [Hz]
_offs #.### ASCII [(double) obtained offs] Set requested offset [V]
_ampl #.### ASCII [(double) obtained ampl] Set requested amplitude [V]
_vrms #.### ASCII [(double) obtained ampl_RMS] Set requested amplitude [V_rms]
_wave # ASCII [(str) obtained waveform] Set waveform type [integer]
ref? / ? ASCII [(str) waveform, (Re)compute the LUT based on the current reference signal
(double) freq, settings and reply with the obtained reference signal
(double) offs, parameters
(double) ampl,
(double) ampl_RMS,
(bool) is_clipping_HI,
(bool) is_clipping_LO,
(int) N_LUT]
autocal ASCII [multiple lines with info, Perform an ADC autocalibration
"Done.\n"]
autocal? ASCII [(bool) is_valid, Report the ADC calibration correction parameters
(int) gaincorr,
(int) offsetcorr]
store_autocal ASCII ["1\n"] Write the ADC autocalibration results to flash. This will
wear out the flash, so don't call it unnecessarily.
lut? ASCII [(int) N_LUT, HAS BECOME OBSOLETE
(bool) is_LUT_dirty]
BINARY [LUT[]]
FOR DEBUGGING
-------------
adc? ASCII [...] ADC register settings
debug? ASCII [...] Misc. debug info
lut_ascii? / la? ASCII [(int) N_LUT, LUT info and array in ASCII
(bool) is_LUT_dirty]
ASCII [(int) LUT[]]
t? ASCII [millis.micros] Report current time.
isr? ASCII [isr_duration[]] Reports the execution time durations of the previous
`isr_psd()` calls in microseconds.
flash? ASCII [flash_was_read_okay] Was the flash read successfully during setup() and did
it contain valid ADC calibration values?