Share this example!

Share this example with your friends on your favorite profile:

You can easily embed this example to your blog or website by copying the following code:

<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/example/ShiftOutX/shiftFourRegistersSPI" frameborder="0"></iframe>


You can also embed the Serial Monitor section! Just use this HTML code.

<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/serialmonitor" frameborder="0"></iframe>



  • 2016-01-11 tzikis

    Hey claespekkala, check out line #45 here https://codebender.cc/libra...
    it's the definition of the function, so it looks like the first argument is the dataPin, and the second one is the clockPin

  • 2016-01-09 claespekkala

    I would like to use shiftoutx witch spi in a project im building, But im not sure on how it works. what does the numbers 10 and 4 stand for in this line

    "shiftOutX regOne(10, 4, MSBFIRST, SPI_CLOCK_DIV2);"

    _latchPin and _NofRegisters or????

  • 2015-11-20 codebender

    This example was tested on 2016-06-11 and it failed to compile on common Arduino boards