0

Help getting started



I am trying to get started writing my own script (i eventually want to get the project to the point of using zones with the GPIO) but I am trying something simple. I have a flash card with just a red,blue,and green .bmp image and a simple script I wrote (see below). I save the script in a file 'autoplay.brs' however it doesn't seem to be working since it doesn't toggle between the blue and green images as I expect (it cycles through all three). Can anyone please give me some advice about getting started getting this script to work?


sub main()

debug = true
v=CreateObject("roVideoMode")
v.SetMode("1920x1080x60i")

i1=CreateObject("roImagePlayer")
i1.SetDefaultMode(0)

while true
i1.DisplayFile("blue.bmp")
sleep(1000)
i1.DisplayFile("green.bmp")
sleep(1000)

end while
end sub

3 comments

  • 0
    Avatar
    RokuLyndon


    The file should be called autorun.brs.



    And, if you're not actually calling functions, you can drop the sub main().



    debug = true

    v=CreateObject("roVideoMode")

    v.SetMode("1920x1080x60i")



    i1=CreateObject("roImagePlayer")

    i1.SetDefaultMode(0)



    while true

    i1.DisplayFile("blue.bmp")

    sleep(1000)

    i1.DisplayFile("green.bmp")

    sleep(1000)



    end while
  • 0
    Avatar
    bostamy


    Thanks for the help...i got confused because on your web page (<!-- m --><a class="postlink" href="http://www.brightsign.biz/implement.php">http://www.brightsign.biz/implement.php</a><!-- m -->) under implement is says just name the script file autoplay.bas
  • 0
    Avatar
    RokuLyndon


    I will have that fixed.
Please sign in to leave a comment.