Would appreciate assistance with this coding problem, arising with two 08M's communicating wirelessly with Jaycar Tx & Rx modules
The serout routine from the sending 08M programme is,
The syntax for entire sending code checks out okay and the simulation is okay. No problems there; the critical 1,0,0, should be output on output 4
The full code for the receiving 08M is
The syntax checks out okay but the simulation runs to the serin command and pops up the Serin dialogue box, shown in the attachment.
No matter what data is placed in this box it either reports illegal serin data - try again or represents the box. What's wrong here.
The intention is to have port 4 read three times, putting 1's and 0's into the specified bits. Then after checking for receipt accuracy, set the alarm
I've looked at the manuals, the forum and David Lincoln's book but do not seem to find any answers. Would appreciate pointers to a solution.
The serout routine from the sending 08M programme is,
Code:
alarm:
bit5 = 1
bit6 = 0
serout 4,N600,(35,35,35,35,35,35,35,35,35,35,"TGA",bit5,bit6,bit6)
The full code for the receiving 08M is
Code:
read1:
serin 4,N600,(35,35,35,35,35,35,35,35,35,35,"TGA",bit0,bit1,bit2)
let bit3 = bit0 + bit1 + bit2
serin 4,N600,(35,35,35,35,35,35,35,35,35,35,"TGA",bit4,bit5,bit6)
let bit7 = bit4 + bit5 + bit6
serin 4,N600,(35,35,35,35,35,35,35,35,35,35,"TGA",bit8,bit9,bit10)
let bit11 = bit8 + bit9+ bit10
let bit12 = bit3 + bit7 + bit11
if bit12 = 3 then alarm
Alarm:
sound 1,(200, 50,0,50,100,50,0,50,50,100,0,50)
wait 1
goto alarm
No matter what data is placed in this box it either reports illegal serin data - try again or represents the box. What's wrong here.
The intention is to have port 4 read three times, putting 1's and 0's into the specified bits. Then after checking for receipt accuracy, set the alarm
I've looked at the manuals, the forum and David Lincoln's book but do not seem to find any answers. Would appreciate pointers to a solution.
Attachments
-
8.8 KB Views: 7