can someone help me with this, i cant get continuously updating text to clear t
laser-vector
Posts: 118
so heres the code continuously
what im trying to do is just have one simple line of text in the top left corner of my vga display the state of pins 3..0, but lets say i had some large numbers displaying:
BINARY = 1111 ... HEX = F ... DEC = 15
and then i want to display a much shorter set of numbers
BINARY = 0 ... HEX = 0 ... DEC = 0
the actual resault will look something like this:
BINARY = 0 ... HEX = 0 ... DEC = 0= 15
now i have tried inserting a "clear screen" command at the end of the loop but it makes the text flicker really bad.
any suggestions?????
Post Edited (laser-vector) : 7/30/2010 3:18:36 AM GMT
PUB menu4 dira[noparse][[/noparse]3..0]~ {sets pins 3..0 to inputs} print($100) {clears the screen from the last menu} print($110) {changes the color of the font} repeat {repeat forever} print_string(string("BINARY =")) print_string(num.tostr(changeme, num#bin)) print_string(string(" ... HEX =")) print_string(num.tostr(changeme, num#hex)) print_string(string(" ... DEC=")) print_string(num.tostr(changeme, num#dec)) changeme := ina[noparse][[/noparse]3..0] {sends pin states to the "changeme" variable} print($101) {prints the "Home Character" to send the cursor to the home position}
what im trying to do is just have one simple line of text in the top left corner of my vga display the state of pins 3..0, but lets say i had some large numbers displaying:
BINARY = 1111 ... HEX = F ... DEC = 15
and then i want to display a much shorter set of numbers
BINARY = 0 ... HEX = 0 ... DEC = 0
the actual resault will look something like this:
BINARY = 0 ... HEX = 0 ... DEC = 0= 15
now i have tried inserting a "clear screen" command at the end of the loop but it makes the text flicker really bad.
any suggestions?????
Post Edited (laser-vector) : 7/30/2010 3:18:36 AM GMT
Comments
Or print 40 spaces first, then print your line?
Or just print something like this:
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
You might also be able to backspace over the old data before writing the new.· I don't remember the ASCII code for backspace; I alway have the ASCII Wikipedia page open when I'm use unfamilar ASCII code.
Note: I just saw Dr_Acula's post as I was previewing mine.
Duane
printing blank spaces to the right did in fact work pretty well but it was easy.. too easy lol!
Sorry to bother you guys with such a trivial problem, but its getting late and i needed to get something working for tomorrow and kind of hit a wall for a second, but i went back and read the propeller manual some more and i actually figured something out that works, it only runs the loop if the value of Changeme updates:
works pretty well and i can still clear the screen without any jitter
Post Edited (laser-vector) : 7/30/2010 4:04:16 AM GMT