Hi,
I experienced have a problem when using Pin I8/A7 as interrupt pin in Arduino OPTA PLC wifi. The Arduino Led keep blinking amber and green, and the COM port cannot be detected. We should do reset button to reconnect the arduino to PC. and as well as the arduino OPTA was not run properly (the arduino stuck cannot response the input).
const int IN_COGNEX01 = 7; //Pin A7 Connected to Cognex
int TimeOUT;
//Interupt Routine Service Variable
volatile bool UserBTNISR_state = false;
volatile bool Input_ISR_State = false;
void setup() {
//Setup Serial for testing
Serial.begin(115000);
//Initialize LED_BUILTIN
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, HIGH);
//Setup the pin number and Led Number for Arduino OPTA
for (int i = 0; i < numRelays; i++) {
// Sets the mode of the relays and user LEDs as outputs
pinMode(relayOutputs[i], OUTPUT);
pinMode(userLeds[i], OUTPUT);
}
//Setup input for Digital Input OPTA
for (int i = 0; i < NUM_PINS; i++) {
pinMode(TERMINALS[i], INPUT);
}
pinMode(BTN_USER, INPUT);
//Setup the time out milliseconds
TimeOUT = 100;
//Interrupt Configuration & Initialization
attachInterrupt(digitalPinToInterrupt(BTN_USER), UserBTNISR, RISING);
attachInterrupt(digitalPinToInterrupt(TERMINALS[IN_COGNEX01]), INPUT_ISR_Procedure, RISING);
}
void loop() {
Reject_Action();
Press_RSTBTN();
}
Anyone has the same problem of using Interrupt in Pin A7 ? or any solution of this issue ?