Shop OBEX P1 Docs P2 Docs Learn Events
Blinking 15 LED's randomly. — Parallax Forums

Blinking 15 LED's randomly.

DgswanerDgswaner Posts: 795
edited 2008-10-30 09:14 in Propeller 1
in Pbasic I could do something like OUTS=!random or OUTS=%110111110010010 is there an equivalent in Spin? I'd appreciate any suggestions for some reason I thought the !outa command would do this but I can't find any synttax of this command that will do this.

thanks

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
DGSwaner

"When in doubt, use C4" - Jamie Hyneman, Myth Buster

Comments

  • BEEPBEEP Posts: 58
    edited 2008-10-30 09:14
    You can use ? Random operator.

    PUB Start | temp
    
      dira[noparse][[/noparse]14..0]~~
      repeat
        waitcnt(clkfreq/10+cnt)     
        outa[noparse][[/noparse]14..0] := ?temp
    
    

    Post Edited (BEEP) : 10/30/2008 9:19:29 AM GMT
Sign In or Register to comment.