paul- wrote: > Just retested and did some investigation. rpi2 has a different memory > address for the GPIO. Will get that fixed.
Friendly advice..... Bite the bullet, use wiringPi and let Gordon worry about addresses and new models...... Tell Steen and Greg that they need to package the lib! ;) Code: -------------------- #include <wiringPi.h> int initialized = -1; void relay( int state) { if (initialized == -1) { wiringPiSetup () ; pinMode (18, OUTPUT) ; initialized = 1; } digitalWrite (18, state) ; } -------------------- ------------------------------------------------------------------------ JackOfAll's Profile: http://forums.slimdevices.com/member.php?userid=3069 View this thread: http://forums.slimdevices.com/showthread.php?t=105018 _______________________________________________ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix