tips:flashingtext
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tips:flashingtext [2015/01/28 19:29] – [Flashing/Alternating Text or Graphics] jt3 | tips:flashingtext [2015/01/28 19:39] (current) – [Flashing/Alternating Text or Graphics] jt3 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Flashing/ | ====== Flashing/ | ||
- | Ever want to display flashing text? How about a battery indicator that flashes when the battery drops below 20%? Or, maybe you'd like to show weather and date in the same space? | + | Ever want to display flashing text? How about a battery indicator that flashes when the battery drops below 20%? Or, maybe you'd like to show weather and date in the same space? |
===== Examples ===== | ===== Examples ===== | ||
Line 7: | Line 7: | ||
==== Flashing ==== | ==== Flashing ==== | ||
- | | + | |
- | + | ||
==== Conditional Flashing ==== | ==== Conditional Flashing ==== | ||
- | | + | |
==== Alternating ==== | ==== Alternating ==== | ||
Line 24: | Line 23: | ||
We're going to use a handy mathematical tool here called Modulo, which in LUA is represented by the percent sign (%). Modulo gives you only the remainder for any division problem. | We're going to use a handy mathematical tool here called Modulo, which in LUA is represented by the percent sign (%). Modulo gives you only the remainder for any division problem. | ||
- | One second on a clock is 6 degrees of rotation (360 degrees / 60 seconds = 6 degrees/ | + | One second on a clock is 6 degrees of rotation (360 degrees / 60 seconds = 6 degrees/ |
You can add conditions to this, such as having the text flash when battery level is below 20%. In the example, the battery level display is steady until battery level falls below 20%, where it will start flashing. | You can add conditions to this, such as having the text flash when battery level is below 20%. In the example, the battery level display is steady until battery level falls below 20%, where it will start flashing. | ||
- | Alternating text is basically this, twice. | + | Alternating text is basically this, twice. |
tips/flashingtext.1422473395.txt.gz · Last modified: 2015/01/28 19:29 by jt3