Hello,
I'm using an Arduino MEGA with 2 Adafruit motor shields v2.
My program does not start after uploading it IF BOTH of the following things are declared in it:
1- One or two of the motor shield is started with the function [board].begin()
2- trying to use one of the external interrupts on PINs 20 or 21.
As far as I know, those are the I2C pins on the MEGA board and the communication with the shields could probably be causing the problem. Is there any way that I could still use the Adafruit shields and taking interrupts from the above mentioned PINs?
Thanks.
Interrupts on PINs 20,21 blocked on MEGA
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67391
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Interrupts on PINs 20,21 blocked on MEGA
The Motor Shield does use I2C to communicate with the controller. On the Mega, that's pins 20 and 21.
-
- Posts: 11
- Joined: Fri Jul 19, 2013 9:52 pm
Re: Interrupts on PINs 20,21 blocked on MEGA
Thx. I already know that. But I mean that the PINs are still free because the shield is mounted on the arduino, so I thought I could probably still make use of their Interrupt abilities!
- adafruit_support_bill
- Posts: 88037
- Joined: Sat Feb 07, 2009 10:11 am
Re: Interrupts on PINs 20,21 blocked on MEGA
It doesn't work that way. Pins 20 and 21 are directly connected to the SDA and SCL pins. Although the there is nothing physically connected at the pin 20/21 locations, the pins are in use for i2c communication.the PINs are still free because the shield is mounted on the arduino, so I thought I could probably still make use of their Interrupt abilities!
Please be positive and constructive with your questions and comments.