-
Notifications
You must be signed in to change notification settings - Fork 1
/
slave.bas
49 lines (36 loc) · 923 Bytes
/
slave.bas
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
goto start
#include "28x2symbols.bas"
#include "sensorroutines.bas"
start:
gosub verifychip
hi2csetup i2cslave, slaveaddr
main:
'pause 100 ''delay for testing, likely unneded
argb1=j11b 'usrf pins
argb2=j11a 'usrf pins
argb3=0 'usrf number; memory slot+65
gosub sgetpulse '''assuming usrf connected to J11 for testing
pause 30
argb1=j13b 'usrf pins
argb2=j13a 'usrf pins
argb3=1 'usrf number; memory slot+65
gosub sgetpulse '''assuming usrf connected to J11 for testing
pause 30
argb1=j15b
argb2=j15a
argb3=3
gosub sgetpulse
pause 30
argb1=j14b
argb2=j14a
argb3=2
gosub sgetpulse
'pause 20
'argb1=j16b
'argb2=j16a
'argb3=4
'gosub sgetpulse
put slaveerrorstatusflags_ptr, slaveerrorstatusflags 'store to send for master
slavetimestamp=slavetimestamp+1
put slavetimestamp_ptr, slavetimestamp 'store to send for master
goto main