samedi 5 novembre 2016

I can't get the RANDOM function in picaxe to work

I have to write a program which selects a random led and lights it up ,however I am having trouble getting the RANDOM function work. I have included the code i have below.

    main:
    RANDOM w0
    w1 = w0// 10+ 1

    SELECTCASE w1
    Case1: 
          high b.1
          pause 1000
          low b.1
    Case2:
          high b.2
          pause 1000
          low b.2
    ENDSELECT
    goto main    




Aucun commentaire:

Enregistrer un commentaire