Roku BrightSign Guide de l'utilisateur Page 30

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 48
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 29
30
Here is an example script that will flash an LED for half a second each time a button is
pressed on the BrightSign button/led board.
print "BrightSign Button-LED Test Running"
p = CreateObject("roMessagePort")
tmr = CreateObject("roMessagePort")
gpio = CreateObject("roGpioControlPort")
gpio.SetPort(p)
sw = CreateObject("roGpioControlPort") 'switch/led control port
sw.SetPort(p)
event_loop:
msg=wait(0, p)
if type(msg)<>"roGpioButton" then event_loop
butn = msg.GetInt()
if butn > 5 then event_loop
sw.SetOutputState(butn+17,1)
print "Button Pressed: ";butn
msg = wait (500, tmr)
sw.SetOutputState(butn+17,0)
clear_events:
msg=p.GetMessage():if type(msg)<>"rotINT32" then clear_events
goto event_loop
Learning More and Support
The following resources can help you get the most from your BrightSign:
1. Visit www.rokulabs.com/brightsign
2. Refer to each of the different BrightSign documents available (listed at the start of
this manual).
3. Visit the BrightSign community Forums to discuss projects with other customers
and Roku engineers: www.rokulabs.com/forums
for help with custom projects
Vue de la page 29
1 2 ... 25 26 27 28 29 30 31 32 33 34 35 ... 47 48

Commentaires sur ces manuels

Pas de commentaire