Syntax
void shiftOut(
    uint32_t ulDataPin, 
    uint32_t ulClockPin, 
    uint32_t ulBitOrder, 
    uint32_t ulVal
);
ContentsIndex
PreviousUpNext
shiftOut
Example
Syntax
void shiftOut(
    uint32_t ulDataPin, 
    uint32_t ulClockPin, 
    uint32_t ulBitOrder, 
    uint32_t ulVal
);
Description

Outputs a byte of data by bits on the assigned pin. Every bit of data is outputted from the data pin. You can select to start output from MSB or LSB of the data. Every clock cycle (meaning the clock goes through a complete high voltage and low voltage) outputs a bit of data.

Parameters
Parameters 
Description 
uint32_t ulDataPin 
[IN] Data output pin, for outputting every bit of data 
uint32_t ulClockPin 
[IN] Clock pin. Periodically switches between high voltage and low voltage when dataPin outputs data 
uint32_t ulBitOrder 
[IN] Data output order. Can be MSBFIRST (MSB first) or LSBFIRST (LSB first) 
uint32_t ulVal 
[IN] Value to be outputted by bits (one byte) 
Example
#define DATA  13
#define CLOCK 15
void setup()
{
    pinMode(DATA, INPUT);
    pinMode(CLOCK, OUTPUT);
}
void loop()
{
    shiftOut(DATA, CLOCK, LSBFIRST, 100);
    delay(1000);
}
File

wiring_shift.h

Group