BrightSign Roku Compact Guide de l'utilisateur Page 72

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 118
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 71
66
Here is an example of a script for the HD410, HD810, or HD1010 that flashes an LED for half a
second each time the user presses a button on the BrightSign button/LED board.
print "BrightSign Button-LED Test Running"
p = CreateObject("roMessagePort")
tmr = CreateObject("roMessagePort")
gpio = CreateObject("roGpioControlPort")
gpio.SetPort(p)
gpio.EnableInput(0)
gpio.EnableInput(1)
gpio.EnableInput(2)
gpio.EnableInput(3)
gpio.EnableOutput(4)
gpio.EnableOutput(5)
gpio.EnableOutput(6)
gpio.EnableOutput(7)
event_loop:
msg=wait(0, p)
if type(msg)<>"roGpioButton" then event_loop
butn = msg.GetInt()
if butn > 3 then event_loop
gpio.SetOutputState(butn+4,1)
print "Button Pressed: ";butn
msg = wait (500, tmr)
gpio.SetOutputState(butn+4,0)
goto event_loop
Vue de la page 71
1 2 ... 67 68 69 70 71 72 73 74 75 76 77 ... 117 118

Commentaires sur ces manuels

Pas de commentaire