Skip to content

Instantly share code, notes, and snippets.

@liz-miller
Last active May 6, 2018 23:42
Show Gist options
  • Save liz-miller/18129719bea687c38e8ea2f6c61be5f8 to your computer and use it in GitHub Desktop.
Save liz-miller/18129719bea687c38e8ea2f6c61be5f8 to your computer and use it in GitHub Desktop.
How to Write a Method (Method Declaration)
/*
* Method Tempate
* Use this sample template to create your own methods in Arduino.
* Developed for the Beginner Bots lesson series on www.learnrobotics.org/blog
* Written by Liz Miller
* 5/6/2018
*/
void move(int motor, int speed, int duration){ //Return Type = Void | Method Name = Move | Input Parameters = motor, speed, duration
// commands go here. everything contained in the curly braces will belong to the "move method"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment