![Ecler PLAYER ZERO Скачать руководство пользователя страница 55](http://html1.mh-extra.com/html/ecler/player-zero/player-zero_user-manual_3964530055.webp)
55
1
SW
7.2.7.3
EXAMPLE SCRIPT03:
Messages can be configured for practical uses. The following
script
displays a "NO
INTERNET" message that flashes when the Internet (WAN) connection is lost. It has also
been written in such a way that we can use the "blink" function multiple times within the
same
script
. In addition, it loads
preset1
, which has local audio content stored and set to
play (PLAY) when loaded, in order to ensure continuity of the music program.
Figure 55
require "PLAYER"
ep = PLAYER.new()
function blink(text1, text2, nTimes)
for blink=1,nTimes ,1 do
ep.LCD_print2({line1=text1, line2=text2, center="true"})
sleep(0.5)
ep.LCD_print2({line1=" ", line2=" ", center="true"})
sleep(0.5)
end
end
blink("NO", "Internet", 5)
ep.PLAYER_open({preset=1})