Place to put your Basic demos and examples

Moderator: Mmiscool

User avatar
By Charly013
#53941 Hello,
the follow Prg crash after aprox 20 loops, why ?

Code: Select all
tft.setup(2, 15, 3)
timesetup(2)
delay 200
Timer 1000, [ti]
wait

do
Loop until 0


[ti]
a =  mid(time(),12,8)
lab2 = tft.obj.label(a,0,160,210,44, 4, tft.rgb(222,222,0) ,tft.rgb(0,44,0))
wait





best regards & have a nice sunday
Charly
User avatar
By Mmiscool
#53942 You can have only 20 tft eliments on the screen.

Possibly try the tft print function as this will not take up any of these eliments.
User avatar
By Charly013
#53968 Hello & tnx 4 replay,

sry, i dont see the limitation of 20 tft eliments ;(

i change the Prg, but its also crash after 120-160 loops , what i make false ?

i use v3a43
ps. if you need i can post Log-files from the Serial Port


Code: Select all
tft.setup(2, 15, 3)

timesetup(2)
loopcount = 0
delay 200


Timer 1000, [ti]
wait

do
Loop until 0


[ti]
t = millis()
print tt
loopcount = loopcount +1
print loopcount
a =  mid(time(),12,8)
[lab2 = tft.obj.label(a,0,160,210,44, 4, tft.rgb(222,222,0) ,tft.rgb(0,44,0))]
tft.text.cursor(0,160)
tft.text.color(tft.rgb(222,222,0))
tft.text.size(4)
tft.rect.fill(0,160,210,44,tft.rgb(0,44,0))
tft.text.cursor(5,166)
tft.print(a)
print tt
print ramfree()
tt = millis()
tt = tt -t
wait