Expected Variable
WORTHYgroup
Posts: 1
My code just now started to have an "expected variable error." The puprle fonted "!" are what the debug highlights. I am new to this so please excuse my lack on knowledge.:) The code is below. I am trying to get transceivers to send GPS information to eachother.
Get_Info:
' SEROUT Sio, Baud, ["!GPS", GetInfo]
' SERIN Sio, Baud, 3000, No_Response, [ver_hw, ver_fw]
' PULSOUT TX, 1200 'Sync pulse for the receiver
' SEROUT TX, 16468, [ "!", ver_hw, ver_fw ]
SERIN Tx, 16468, [ "!", ver_hw, ver_fw ]
DEBUG MoveTo, FieldLen, 3, HEX ver_hw.HIGHNIB, ".", HEX ver_hw.LOWNIB
DEBUG MoveTo, FieldLen, 4, HEX ver_fw.HIGHNIB, ".", HEX ver_fw.LOWNIB
RETURN
If the whole code is needed please let me know:)
Thanks in advance for your help!
Get_Info:
' SEROUT Sio, Baud, ["!GPS", GetInfo]
' SERIN Sio, Baud, 3000, No_Response, [ver_hw, ver_fw]
' PULSOUT TX, 1200 'Sync pulse for the receiver
' SEROUT TX, 16468, [ "!", ver_hw, ver_fw ]
SERIN Tx, 16468, [ "!", ver_hw, ver_fw ]
DEBUG MoveTo, FieldLen, 3, HEX ver_hw.HIGHNIB, ".", HEX ver_hw.LOWNIB
DEBUG MoveTo, FieldLen, 4, HEX ver_fw.HIGHNIB, ".", HEX ver_fw.LOWNIB
RETURN
If the whole code is needed please let me know:)
Thanks in advance for your help!
Comments
The error message is correct. You can't have "!" in the input list for SERIN. You probably want to have WAIT("!") which is allowed. Look in the Stamp Manual in the chapter on SERIN for details.