wiringPi Interrupts

136 views
Skip to first unread message

Paul Dunn

unread,
Dec 23, 2014, 9:10:50 PM12/23/14
to lightsh...@googlegroups.com
I'd appreciate some help if somebody has a few extra minutes. I am having a heck of a time getting wiringpiISR to work in python. works great in C, but the call in python to create the ISR

wp.wiringpiISR(pin,edge,callback func)
throws an error about bad type (void *) void
works fine in C as I pass the address of the callback function (wiringpiISR(pin,INT_EDGE_FALLING, &my_ISR);
last post on wiringpi2 python github that I could find was something to the effect of "yep, doesn't work right"

I have the interrupt working in python if I use RPI.GPIO,
it works, but not quite as well as C. Depending on what delay I put in, the light flickers very slowly when it should just be on steady

thanks

I realize you guys probably don't have the optoisolators and triacs sitting around, but if you have a breadboard and button, you can do the interrupts too. the
zero-cross setup will pull the pin high for it's interrupt

Tom Enos

unread,
Dec 23, 2014, 10:29:58 PM12/23/14
to lightsh...@googlegroups.com
Looking at the docs for SWIG it is not going to work.

But it does go on to say that you could use your c callback function
Reply all
Reply to author
Forward
0 new messages