File size: 295 Bytes
a2a15a2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
10 REM "I2C analog slave"
20 REM "A is the analog port"
30 A=AZERO
100 REM "the setup()"
110 PRINT "Open slave mode on port 8"
120 OPEN &7, 8, 1 
200 REM "loop() binary data transfer"
210 FOR I
220 V=AREAD(A)
230 A$(1)=INT(V)%256 
240 A$(2)=INT(V)/256
250 PRINT &7, A$
260 DELAY 300
270 NEXT I