Skip to content

Commit

Permalink
Create data_acquisition.py
Browse files Browse the repository at this point in the history
  • Loading branch information
TimotheeeNiven authored Jan 17, 2025
1 parent 361ae60 commit fc192be
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions LMP01A-CODE/data_acquisition.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/env python3

from src.LPM01A import LPM01A

try:
lpm = LPM01A(port="COM19", baud_rate=3864000, print_info_every_ms=10_000)
lpm.init_device(mode="ascii", voltage=3300, freq=1000, duration=0)
lpm.start_capture()
lpm.read_and_parse_data()
except KeyboardInterrupt:
print("KeyboardInterrupt detected. Exiting...")
lpm.stop_capture()
lpm.deinit_capture()
exit(0)

0 comments on commit fc192be

Please sign in to comment.