Created
June 14, 2020 13:57
-
-
Save shrddr/c0fad81d7a94ec0177883d40cb5c4c27 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# plot voltages captured by arduino ADC (AnalogReadSerial example) | |
# capture data with RealTerm 3.0 | |
# use custom timestamp format: yyyy-mm-dd hh:nn:ss.zzz | |
import pandas as pd | |
df = pd.read_csv('capture.txt', names=['t','v'], parse_dates=['t']) | |
df['v'] = df['v'] / 1023 * 5 | |
df['ms'] = (df['t'] - df['t'][0]).astype('timedelta64[ms]') | |
df.plot('ms','v') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment