Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
raspberry-pi
sense-hat
Commits
cd85989d
Commit
cd85989d
authored
Jan 04, 2019
by
Rousseau Vincent
Browse files
add read csv script
parent
e118dcfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
read_csv.py
0 → 100644
View file @
cd85989d
import
csv
import
matplotlib.pyplot
as
plt
from
scipy
import
signal
with
open
(
'sense_hat_data_2019_01_04_00_00.csv'
)
as
f
:
datas
=
csv
.
reader
(
f
)
header
=
next
(
datas
)
temp
=
[]
time
=
[]
for
row
in
datas
:
time
.
append
(
float
(
row
[
0
]))
temp
.
append
(
float
(
row
[
2
]))
print
(
temp
)
temp_decimate
=
signal
.
decimate
(
temp
,
10
,
3
,
zero_phase
=
True
)
print
(
temp_decimate
)
plt
.
plot
(
time
,
temp
)
plt
.
show
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment