We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I am using processing 3.2.1 on Raspberry Pi3. I have imported the library : "import processing.io.*"
and my program properly works to run the function GPIO.attachInterrupt(2, this, "DocState", GPIO.RISING);
in setup method. now within callBack function : DocState if I am using the "noInterrupts();" and "interrupts()" it is showing the error that function doesn't exist.
I have no idea why this is happening as Library is included and one of the function is running. I updated processing and restarted R-Pi3 but unable to get through it!
Answers
Got resolved.....
The processing example in the link has used set of instructions like : "interrupts()" and "noInterrupts()" which I was running by copying from examples it was showing errors which says the function "noInterrupts()" doesn't exist while i was successfully using attachInterrupt(). As the example didn't work I had long time checking library files and all. But still couldn't find solution.
It worked perfectly when I added "GPIO." prefix and instructions were like "GPIO.interrupts()" and "GPIO.noInterrupts()".
This needs to be somehow updated in example source codes.
https://github.com/processing/processing/blob/570d441fb22165a554129b715bf04135c41b5b1d/java/libraries/io/src/processing/io/GPIO.java#L323
it's in the source as
the static means it'll need calling using the classname (as you have)
GPIO.noInterrupts();
alternatively you can add static to the import and you'll then be able to just use
noInterrupts()
. but i prefer the method you've used as it's more explicit.Thanks @Bhargav, good catch. I'll update the example.