-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharduino-datalogger-plot.R
31 lines (12 loc) · 985 Bytes
/
arduino-datalogger-plot.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# growth chamber arduino datalogger trials
# Snijder2 March 14 2017
setwd("/Volumes/Extended/Arduino-TC/")
data.frame = read.csv("371715.CSV")
data.frame$time = paste(data.frame$year,"-",data.frame$month,"-",data.frame$day," ",data.frame$hour,":",data.frame$minute,":",data.frame$second,sep="")
data.frame$time = as.POSIXct(data.frame$time, "%Y-%m-%d %I:%M:%s")
plot(data.frame$time, data.frame$room_temp_1, type="l", xlab="", ylab="temp_diff_1")#, ylim=c(-20,30))#, xlim=c(as.POSIXct("2017-03-10 23:59:59"), max(as.POSIXct("2017-03-13 01:12:00"))))
plot(data.frame$time, data.frame$room_temp_2, type="l", xlab="")#, ylab="temp_diff_1")#, ylim=c(-20,30))#, xlim=c(as.POSIXct("2017-03-10 23:59:59"), max(as.POSIXct("2017-03-13 01:12:00"))))
tail(data.frame)
sub1 = data.frame[data.frame$time > as.POSIXct("2017-03-07 23:59:00"),]
sub1 = data.frame[data.frame$time < as.POSIXct("2017-03-08 23:59:59"),]
plot(sub1$time, sub1$light_1, type="l", xlab="", ylab="light_1")