update
This commit is contained in:
@@ -19,6 +19,8 @@ write_fs(frequency: int) -> sampling freq
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
import nsrt_mk3_dev
|
import nsrt_mk3_dev
|
||||||
|
from nsrt_mk3_dev import Weighting
|
||||||
|
|
||||||
|
|
||||||
nsrt = nsrt_mk3_dev.NsrtMk3Dev('/dev/ttyACM0')
|
nsrt = nsrt_mk3_dev.NsrtMk3Dev('/dev/ttyACM0')
|
||||||
|
|
||||||
@@ -27,6 +29,14 @@ nsrt = nsrt_mk3_dev.NsrtMk3Dev('/dev/ttyACM0')
|
|||||||
nsrt.write_tau(60)
|
nsrt.write_tau(60)
|
||||||
#####################
|
#####################
|
||||||
|
|
||||||
|
#####################
|
||||||
|
#change Weighting curve
|
||||||
|
# - Weighting.DB_A (A-weighting - most common for environmental noise)
|
||||||
|
# - Weighting.DB_C (C-weighting - for peak measurements)
|
||||||
|
# - Weighting.DB_Z (Z-weighting - linear/flat response)
|
||||||
|
nsrt.write_weighting(Weighting.DB_A)
|
||||||
|
#####################
|
||||||
|
|
||||||
freq_level = nsrt.read_fs() #current sampling frequency
|
freq_level = nsrt.read_fs() #current sampling frequency
|
||||||
time_constant = nsrt.read_tau() #reads the current time constant
|
time_constant = nsrt.read_tau() #reads the current time constant
|
||||||
leq_level = nsrt.read_leq() #current running LEQ and starts the integration of a new LEQ.
|
leq_level = nsrt.read_leq() #current running LEQ and starts the integration of a new LEQ.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
___) | |_| | |_| | |\ | |_| |
|
___) | |_| | |_| | |\ | |_| |
|
||||||
|____/ \___/ \___/|_| \_|____/
|
|____/ \___/ \___/|_| \_|____/
|
||||||
|
|
||||||
python3 /var/www/nebuleair_pro_4g/sound_meter/get_data.py
|
python3 /var/www/nebuleair_pro_4g/sound_meter/NSRT_mk4_get_data.py
|
||||||
|
|
||||||
Script to get data from the NSRT_MK4 Sound Level Meter
|
Script to get data from the NSRT_MK4 Sound Level Meter
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ rtc_time_str = row[1] # '2025-02-07 12:30:45'
|
|||||||
freq_level = nsrt.read_fs() #current sampling frequency
|
freq_level = nsrt.read_fs() #current sampling frequency
|
||||||
time_constant = nsrt.read_tau() #reads the current time constant
|
time_constant = nsrt.read_tau() #reads the current time constant
|
||||||
leq_level = nsrt.read_leq() #current running LEQ and starts the integration of a new LEQ.
|
leq_level = nsrt.read_leq() #current running LEQ and starts the integration of a new LEQ.
|
||||||
weighting = nsrt.read_weighting() #weighting curve that is currently selected
|
weighting = nsrt.read_weighting() #weighting curve that is currently selected ( A ou C)
|
||||||
weighted_level = nsrt.read_level() #current running level in dB.
|
weighted_level = nsrt.read_level() #current running level in dB.
|
||||||
|
|
||||||
#print(f'current sampling freq : {freq_level} Hz')
|
#print(f'current sampling freq : {freq_level} Hz')
|
||||||
|
|||||||
Reference in New Issue
Block a user