Handling PWM with interrupt

Hello everyone,

Here is my project : I have an Arduino Mega sending orders via I2C to a Arduino Nano every sec. The nano waits until an order is received then moves a servomotor and changes the speed of a brushless accordingly. Then the nano sends some information (temperature, voltage) to the Mega via I2C. Finally it goes back to waiting and repeat.

I'd like to know what would be the best way to avoid resetting the brushless motor with a too big ramp up. Should I use interrupt or just call a ramp up/down function inside the loop ?

Thanks a lot.

zentfr:
I'd like to know what would be the best way to avoid resetting the brushless motor with a too big ramp up. Should I use interrupt or just call a ramp up/down function inside the loop ?

You have not provided much information.

If the ramp up/down works in loop() then why would one consider an interrupt?

...R

Why would one try to use interrupts without understanding their purpose? :roll_eyes: