Using a Shift Register with Breakout

About Forums Forum Using a Shift Register with Breakout

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #638
    theutherfish
    Participant

    I’m new to Arduino so bare with me.

    I’ve been following this tutorial, http://arduino.cc/en/Tutorial/ShftOut11┬áto get a shift register to count up to 255 using a series of LEDs and it works fine.

    However I’m trying to control the value that is getting passed to the data pin.

    var arduino = new IOBoard(“172.16.3.36”, 8887);
    var led;

    // listen for the IOBoard READY event which indicates the IOBoard
    // is ready to send and receive data
    arduino.addEventListener(IOBoardEvent.READY, onReady);

    function onReady(event) {

    // remove the event listener because it is no longer needed
    arduino.removeEventListener(IOBoardEvent.READY, onReady);

    arduino.setDigitalPinMode(11, Pin.PWM);
    led = arduino.getDigitalPin(11);

    // use jQuery to get a reference to the buttons
    // and listen for click events
    $(‘#start-value-btn’).on(‘click’, turnLedOn);
    $(‘#reset-value-btn’).on(‘click’, turnLedOff);
    }

    var turnLedOn = function (evt) {
    led.value = $(‘#numberbox’).val();
    };

     

    What I would like to know is why this isn’t working? The sequence of the lights stay the same no matter what you enter. Is this even possible doing it this way?

    If it is not possible, is it possible to call a custom function written in the firmata sketch from the javascript which can do this?

    Thank you in advance

    #643

    ShiftIn and ShiftOut are not currently supported by StandardFirmata. There is a proposal to add that functionality but it may not be for a few more months.

    There is another way to use Breakout in which you write your own firmware for the Arduino rather than using StandardFirmata. This way you can send any type of data between the Arduino board and your browser. At this point I don’t have a tutorial on writing custom firmware for Breakout, but there are a couple of examples. Refer to Breakout/custom_examples. I hope to post a tutorial soon though.

    #644
    theutherfish
    Participant

    I’m looking forward to seeing those functions available soon, obviously this is done in the dev’s free time so it might take some time.

    The custom examples look like a good starting point.

    Thank you again

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