Took a little trial-n-error, but I was able to create a simple program to turn the new relay on/off that is part of OSPi 1.3.
Wanted to share, but also wanted to ensure this is the right snippet to control it within a C program. Sometimes ‘works’ is not always ‘right’…
#include
#include
#include
main() {
int duration=1; /*leave relay on 1 minute */
wiringPiSetupGpio ();
pinMode (15, OUTPUT) ;
digitalWrite (15, HIGH);
delay((unsigned int) duration*1000*60);
digitalWrite(15,LOW);
exit(0);
}