timers and interupts

If I wanted to run brushless motor on an ESC for a preset amount of time after it receives an input to turn on I would want to add an interupt, correct?


what would I need then?

Scan your switch every ~50ms and look for a change in state to LOW or HIGH.

Here are typical switch connections.


See the change in state switch example.

just use the servo library, and when the Arduino receives the command to turn on, have it run a version of this function

void motor(){

Serial.println("Sending maximum throttle");

delay (1000);

Serial.println("Sending minimum throttle");