xbee and prop chapter 4 tutorial
I have a stupid newb question.
In the xbee tutorial by step lindsay in chapter 4, there is a program called "simple debug" for the prop in spin.
The program essentially transmits such that the receiving xbee counts up from one to 20.
It runs fine, but it doesn't loop.
Is it supposed to? I thought that was the purpose of the "repeat" statement.
If not, how would one write it so it repeats?
fsb
In the xbee tutorial by step lindsay in chapter 4, there is a program called "simple debug" for the prop in spin.
The program essentially transmits such that the receiving xbee counts up from one to 20.
It runs fine, but it doesn't loop.
Is it supposed to? I thought that was the purpose of the "repeat" statement.
If not, how would one write it so it repeats?
fsb

Comments
If so then the repeat loop is working as it should.
fsb
Pub Start | Counter XB.start(XB_Rx, XB_Tx, 0, XB_Baud) ' Initialize comms for XBee Delay (1000) ' one second delay repeat Counter from 1 to 20 ' count up to 20 ' Send to Base XB.str(string("Count is:")) ' send string XB.dec(Counter) ' send decimal value XB.Tx(CR) ' send Carriage Return Delay(250)To this:
Pub Start | Counter XB.start(XB_Rx, XB_Tx, 0, XB_Baud) ' Initialize comms for XBee Delay (1000) ' one second delay [COLOR=Red]repeat ' <--- insert this line[/COLOR] repeat Counter from 1 to 20 ' count up to 20 ' Send to Base XB.str(string("Count is:")) ' send string XB.dec(Counter) ' send decimal value XB.Tx(CR) ' send Carriage Return Delay(250)That did the trick. I see the importance of proper indentation.
That helped alot
fsb