In [1]:
%matplotlib inline
from matplotlib import pyplot as plt
import pandas as pd
from scipy import signal
import numpy as np
import recorder
In [2]:
%load_ext autoreload
%autoreload 2
In [3]:
# Record 200 samples worth of data, delaying acquisition by 5 seconds
# this can be done also using the command line interface of recorder.py
recorder.run(port='/dev/ttyACM0', outfile='test.out', holdoff=5, debug=False, samples=200)
In [4]:
# Read from the recorded session
df = pd.read_csv('test.out', delimiter='\t', index_col=0)
In [5]:
df_ts = pd.DataFrame(df.index)
df_ts_diffs = df_ts.diff()
In [6]:
df_ts_diffs[10:40].plot()
Out[6]:
In [7]:
df_ts_diffs.hist()
Out[7]:
In [ ]: