Propeller Backpack Video Overlay
bunkerush5
Posts: 10
Hello,
Has anyone had success in displaying a variables value on the video overlay. I loaded the PropBP_overlay_demo from parallax with no problems but it seems as though you can only display strings. Just to test I tried to increment a value by 1 every second and display the result. Something online said to use the fullduplexserial but I am not sure how that would work properly. A little guidance would be greatly appreciated.
Thanks.
Has anyone had success in displaying a variables value on the video overlay. I loaded the PropBP_overlay_demo from parallax with no problems but it seems as though you can only display strings. Just to test I tried to increment a value by 1 every second and display the result. Something online said to use the fullduplexserial but I am not sure how that would work properly. A little guidance would be greatly appreciated.
Thanks.
Comments
I wrote a little demo which includes a "dec" method.
I didn't connect my Backpack to a TV to test the program so let me know if it doesn't work.
-Phil
Thanks for your help. I was not able to get the variable to display using your code. The video image comes through but nothing else. Any idea what could be wrong?
How do you go about using the dec method with the overlay str method? This is where I am stuck. I tried to do it with fullduplexserial like this and it did not work.
OBJ
pr : "prop_backpack_tv_overlay2"
serial:"FullDuplexSerial"
VAR
byte buffer[BUF_SIZE]
long x
PUB start | i
pr.start(@buffer, BUF_SIZE)
pause(2000)
serial.start(31, 30, 0, 9600)
'num.init
x:=1
repeat
x:=x+1
pr.str(string(DEFWIN, 10, 40, DBL|2, CHGCLR, $f, _0, 8|TPT, 1, APNDSP, 10, SHO|10, _0, 20, SHODSP, 10, WDWRAP, 1))
pr.str(string(serial.str(x, dec)))
pause(2000)
-Phil
If you use the Simple_Numbers.spin in the OBJ section as:
You should be able to display a number with:
I only looked at the numbers object in the Prop Tool library, I haven't looked at Phil's "plus" version but I bet it works the same.
Edit: Phil bet me to it but I see we pretty much say the same thing.
Start with a code tag.
[c0de]
' paste code between tags
x := 1
[/c0de]
If I change the "0" to "o" in the above lines, I get:
This way the indentation shows up correctly in the posted code.