C3 and Xbee
topherslater
Posts: 3
I have played with the prop in the past but the whole VGA thing is hurting my brain.
I have the C3 running the VGAHiResTextGUIDemo1.2. I see that one of the default text boxes has a few scrolling text fields. I want to recieve a text from a remote Prop/xbee combo and have it displayed in one of those fields.
I have used the TV_text object with the Xbees to preform this function but I want to pretty it up a bit and add in some additional bells and whistles.
Here is where I think the code needs to be injected into the VGA DemoCode more specificly in the GUIDemo around line 328 .
if logging == 1
if TMRS.isClr( tmr1 ) 'if timer 1 expired write line text into textbox 1
TMRS.set( tmr1, 10 )
cnt1++
bytemove( @strBuf, string( "This is line number " ), 20 )
str := NUMS.dec( cnt1 )
tmp := strsize( str ) + 1
bytemove( @strBuf[20], str, tmp )
GUI.TBOXPrint( TBOX1, @strBuf, 0 )
I believe I need to Turn the Char(s) that I was receiving (as in the TV_text) from the Xbees into a string and then call it from this code. I see they are using the bytemove command to move the string into a buffer area and the variable part of the string is appended to the end with the [20] command. The GUI.TBOXPrint prints that buffer to the a particular field, and I believe the zero is the "null" of a null terminated string....
I can see the logic but I can not implement it.
I have the C3 running the VGAHiResTextGUIDemo1.2. I see that one of the default text boxes has a few scrolling text fields. I want to recieve a text from a remote Prop/xbee combo and have it displayed in one of those fields.
I have used the TV_text object with the Xbees to preform this function but I want to pretty it up a bit and add in some additional bells and whistles.
Here is where I think the code needs to be injected into the VGA DemoCode more specificly in the GUIDemo around line 328 .
if logging == 1
if TMRS.isClr( tmr1 ) 'if timer 1 expired write line text into textbox 1
TMRS.set( tmr1, 10 )
cnt1++
bytemove( @strBuf, string( "This is line number " ), 20 )
str := NUMS.dec( cnt1 )
tmp := strsize( str ) + 1
bytemove( @strBuf[20], str, tmp )
GUI.TBOXPrint( TBOX1, @strBuf, 0 )
I believe I need to Turn the Char(s) that I was receiving (as in the TV_text) from the Xbees into a string and then call it from this code. I see they are using the bytemove command to move the string into a buffer area and the variable part of the string is appended to the end with the [20] command. The GUI.TBOXPrint prints that buffer to the a particular field, and I believe the zero is the "null" of a null terminated string....
I can see the logic but I can not implement it.