122 Connectivity
Notes:
Ê Sets up this unit to receive and display the variable msg.
Ë Then lets this user enter a message in msg and send it.
Ì Loop executed by the unit that receives the first message.
Í Lets this user enter a message in msg and send it.
Î Then sets up this unit to receive and display msg.
Ï Loop executed by the unit that sends the first message.
To synchronize GetCalc and SendCalc, the loops are arranged so that the receiving
unit executes GetCalc while the sending unit is waiting for the user to enter a
message.
Running the Program
This procedure assumes that:
• The two devices are linked with the connecting cable.
• The Chat program is loaded on both devices.
– Use each device’s Program Editor to enter the program.
– or –
:Chat()
:Prgm
:ClrIO
:Disp "On first unit to send,","
enter 1;","On first to receive,"
:InputStr " enter 0",msg
:If msg="0" Then
: While true
: GetCalc msg
: Disp msg
: InputStr msg
: SendCalc msg
: EndWhile
:Else
: While true
: InputStr msg
: SendCalc msg
: GetCalc msg
: Disp msg
: EndWhile
:EndIf
:EndPrgm
Ê
Ë
Ì
Í
Î
Ï