-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBasic Event Based Email
50 lines (38 loc) · 964 Bytes
/
Basic Event Based Email
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
'CR300 Series Datalogger, Cell210
' Created by Ian Higgins 2019.12.30
Public PTemp, Batt_volt
Public forcetalk ' says if channel is open
Public ServerResp As String
Do
Do
Loop
Loop
Public email As String
'Define Data Tables.
DataTable (Test,1,-1) 'Set table size to # of records, or -1 to autoallocate.
DataInterval (0,15,Sec,10)
Minimum (1,Batt_volt,FP2,False,False)
Sample (1,PTemp,FP2)
Sample (1,forcetalk,FP2)
EndTable
'Define Subroutines
'Sub
'EnterSub instructions here
'EndSub
'Main Program
BeginProg 'blinks a light every second
Scan (1,Sec,0,0)
PanelTemp (PTemp,60)
Battery (Batt_volt)
CallTable Test
NextScan
SlowSequence
Scan (1,Sec,0,0)
VoltDiff (forcetalk,1,mV2500,3,True ,0,60,1.0,0) 'DIFF Channel 3
If forcetalk < 1 AND forcetalk > -1 Then
'if port is closed returns -1, else returns 0
email = EmailRelay ("Email@domain","Test Email","Hello, Dave.",ServerResp)
EndIf
NextScan
EndSequence
EndProg