onPinFall and onPinRise not doing what they should?

I have been trying to get the interrupt functions to work, but I'm getting strange results. If I use onPinFall it appears to not work at all. If I use onPinRise the function is called when the pin goes high AND when the pin goes low.  I tried the interrupt example, direct cut and paste, using onPinFall and it didn't work either. 
I'm using Linux Mint 18.3, Zerynth 2.1, and an Arduino Due.
I've attached my full program, and a copy of the output. You can see that the "released" function gets called but the "pressed" function is never called. You can also see a few places where  "release" is called when I have pressed the button, and is then called again when I release the button. It is also called twice when I have quickly pressed and released the button.
What am I doing wrong?
:-( Ian


  • Hi mogplus8,

    this is a known issue, and we are already working on it.
    SAM3X devices (ArduinoDue and Flip&Click) have a bug in their onPinFall function.
    Try to build your application, at least for now, with the onPinRise waiting for our updates.

    Stay tuned :) 
    Matteo Cipriani
    Zerynth Support Team
  • mogplus8mogplus8 Member
    Ok, thanks Matteo. No rush, just thought I was doing something wrong.
    ;-) Ian
  • Hi mogplus8,

    onPinFall and onPinRise function are now fixed for sam3x based devices (arduino due and flipnclick).
    To test it, you have to create a new virtual machine for your device (don't worry the number of your available licenses will not decrement) and virtualize it again.

    Let me know if this fixes your problem :)
    Matteo Cipriani
    Zerynth Support Team
  • nborrellnborrell Member
    I can confirm that the problem is now fixed for Arduino DUE
Sign In or Register to comment.

ZERYNTH Community

@ 2016, all rights reserved.