» Topic: Change Digital Pin with .spinner jQueryBreakout

Change Digital Pin with .spinner jQuery

About Forums Forum Change Digital Pin with .spinner jQuery

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #849
    rbrz
    Participant

    re all,

    I’m trying to use a spinner jQuery ui box to set manually a pin in a getDigitalPin(pinValue). Is this possible?

    I do this:

    <code>

    var pinValue = 9; //Default port is 9.

     

    function onReady(event) {

     

    arduino.removeEventListener(IOBoardEvent.READY, onReady);

    led = new LED(arduino, arduino.getDigitalPin(pinValue));

    $(‘#spinner’).spinner({

    min: 3,

    max: 13,

    step: 1

    });

    }

     

    $( “#spinner” ).bind( “spinchange”, function() {

    var spinnerValue = $(“#spinner”).spinner(“value”);

    pinValue = spinnerValue;

     

    })

    </code>

    but nothing else…

    best from brazil and sorry if this is a newbie question 🙂

    #850
    rbrz
    Participant

    Hi,

    I found a way to solve this but I don’t if this is the best method.

    $( “#spinner” ).bind( “spinchange”, function() {
    var spinnerValue = $(“#spinner”).spinner(“value”);
    led = new LED(arduino, arduino.getDigitalPin(spinnerValue));

    });

    abraços

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Forum’ is closed to new topics and replies.