-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEndpointrecive.py
35 lines (28 loc) · 978 Bytes
/
Endpointrecive.py
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
#This is the code for the recciving tower on the mainland. This tower does not need to send so it recives data and it writes it to a text file.
import RFM69
from RFM69registers import *
import datetime
import time
import base64
import customcode
from customcode2 import
cap = cv2.VideoCapture(0)
x=0
while true:
rm = RFM69.RFM69(RF69_915MHZ, 1, 1, True)
while True:
rm.receiveBegin()
while not test.receiveDone():
time.sleep(.1)
s = "%s from %s RSSI:%s" % (",".join([chr(letter) for letter in test.DATA]), test.SENDERID, test.RSSI)
print s
f = open('data.txt','w')
f.write(s",")
f.close()
if rm.ACKRequested():
rm.sendACK()
#psuedocode example
rm.writetofile(decision.py)
sleep("30","Days")
model.train()
model.reddploy()