Also you are clearing t every cycle.... Move t=0 to the upper half of the if else statement.
In fact do this
In fact do this
Code:
if t>= 10 then
t=0
toggle rled
endif