Hardware Interrupt

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
postfacto
 
Posts: 4
Joined: Tue Jun 06, 2023 3:57 pm

Hardware Interrupt

Post by postfacto »

What is the smallest Arduino compatible Adafriut board that has external hardware interrupt input?

Thanks

User avatar
adafruit_support_bill
 
Posts: 88092
Joined: Sat Feb 07, 2009 10:11 am

Re: Hardware Interrupt

Post by adafruit_support_bill »


User avatar
postfacto
 
Posts: 4
Joined: Tue Jun 06, 2023 3:57 pm

Re: Hardware Interrupt

Post by postfacto »

On the nano I would connect to pin 2 and code "attachInterrupt(0, checkSensor, RISING);"
Is it the same for the Trinket MO?

User avatar
adafruit_support_bill
 
Posts: 88092
Joined: Sat Feb 07, 2009 10:11 am

Re: Hardware Interrupt

Post by adafruit_support_bill »

For the trinket M0, you can use any of the GPIO pins. Then use the digitalPinToInterrupt() function to determine which interrupt number is associated with it.

For example:

Code: Select all

attachInterrupt(digitalPinToInterrupt(interruptPin), checkSensor, RISING);
https://reference.arduino.cc/reference/ ... interrupt/

User avatar
postfacto
 
Posts: 4
Joined: Tue Jun 06, 2023 3:57 pm

Re: Hardware Interrupt

Post by postfacto »

Thaaaank you!

User avatar
postfacto
 
Posts: 4
Joined: Tue Jun 06, 2023 3:57 pm

Re: Hardware Interrupt

Post by postfacto »

What is the voltage input range?

User avatar
adafruit_support_bill
 
Posts: 88092
Joined: Sat Feb 07, 2009 10:11 am

Re: Hardware Interrupt

Post by adafruit_support_bill »

For power to the BAT pin: 3-6v.
For inputs to GPIO pins: max 3.3v.

https://learn.adafruit.com/adafruit-tri ... no/pinouts

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”