pi-lights/sr.c

32 lines
576 B
C
Raw Normal View History

2017-01-03 11:17:10 -05:00
/*
* sr.c:
* Shift register test program
*
* Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
***********************************************************************
*/
#include <stdio.h>
#include <wiringPi.h>
#include <sr595.h>
int main (void)
{
// int i, bit;
wiringPiSetup ();
// Pin base 100 for 10 pins.
// Use wiringPi pins 0, 1 & 2 for data, clock and latch
sr595Setup (100, 8, 2, 3, 0);
printf ("Raspberry Pi - Shift Register Test\n");
for (;;) {
digitalWrite (106, 1);
digitalWrite(104, 1);
}
return 0;
}