Jump to content

IO-4 Bricklet 2.0 Interrupts


stevehayles

Recommended Posts

Hi,

 

In the version 2.0 of the IO-4 bricklet we have lost the ability to have an interrupt from any of the inputs. 

 

This is viewed as an 'improved' API but it seems that simple interrupts can be very useful in a number of scenarios.  I was using the older IO-4 bricklet to interface with a low frequency flow meter and it's hard to replicate a similar system now with the new bricklet.

 

Will the original bricklet be discontinued at some point ?

 

Is there any way of adding interrupt capability to the new bricklet ?

 

Will the IO-16 board go the same way ?

 

Thanks

Link zu diesem Kommentar
Share on other sites

What exactly do you mean by "interrupt from any of the inputs"? There should be no functionality lost with the new API.

 

If you call set_all_input_value_callback_configuration with period = 1ms and value_has_to_change=True, the CALLBACK_ALL_INPUT_VALUE will be called any time that there is any change on one of the inputs.

 

If you only want this for one channel you can use set_input_value_callback_configuration.

Link zu diesem Kommentar
Share on other sites

Thanks for your reply, it makes sense now.  I was looking for a way to get an interrupt on a single edge (rising for instance) and with that in mind I misread the documentation.

 

I guess the simple answer for now is to simply filter out the 'falling edges' in my own code.  This will work fine for now although maybe long term being able to configure these callbacks for which edge type would be a nice addition.

 

Loving the Tinkerforge system by the way !

Link zu diesem Kommentar
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

×   Du hast formatierten Text eingefügt.   Formatierung jetzt entfernen

  Only 75 emoji are allowed.

×   Dein Link wurde automatisch eingebettet.   Einbetten rückgängig machen und als Link darstellen

×   Dein vorheriger Inhalt wurde wiederhergestellt.   Clear editor

×   Du kannst Bilder nicht direkt einfügen. Lade Bilder hoch oder lade sie von einer URL.

×
×
  • Neu erstellen...