MrDEB
Well-Known Member
Been experimenting with my Swordfish code for my art project and this is what I came up with.
WHY IT WORKS?
the head_light LED goes dim then bright and repeats
ticks = (ticks + 1)
if ticks >=4
then
ticks = 0
end if
While true
//LOOKS WEIRD CODE BUT THE HEADLIGHT GOES DIM THEN BRIGHT
if ticks <= 3 then
head_light = 1
end if
if ticks >= 2 then
head_light = 0
endif
WHY IT WORKS?
the head_light LED goes dim then bright and repeats
ticks = (ticks + 1)
if ticks >=4
then
ticks = 0
end if
While true
//LOOKS WEIRD CODE BUT THE HEADLIGHT GOES DIM THEN BRIGHT
if ticks <= 3 then
head_light = 1
end if
if ticks >= 2 then
head_light = 0
endif