Notifications
Clear all

Interrupt

1 Posts
1 Users
1 Likes
725 Views
Miramar
(@fvpg09)
Miramar
Joined: 3 years ago
Posts: 1
Topic starter  

In our project we use this sentence "attachInterrupt(interruptNumber, ISR_StopMotors, FALLING);"

void ISR_StopMotors()

{

  char line[15];

  strcpy(line, "STOP    ");

  Display_Command(line); //

 

  Stop_Motors();

  beep();

}

 

void Display_Command(char* line)

{

  lcd.setCursor(0, 1);

  lcd.print(line);

  lcd.setCursor(0, 0);

  return;

}

Later all was ok because we used a lcd display 1602.

But the problem now is we are using a lcd display 1602 I2C, and now dosen't work because we are using I2C in a interrupt function. How can we solve this problem, could you help me! Thanks.


   
Sean451 reacted
Quote