Skip to content

Instantly share code, notes, and snippets.

@JeffersGlass
Created June 21, 2020 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JeffersGlass/f6f668dae6f0e81dbbd4091279330470 to your computer and use it in GitHub Desktop.
Save JeffersGlass/f6f668dae6f0e81dbbd4091279330470 to your computer and use it in GitHub Desktop.
int num = 5;
void setup() {
Serial.begin(57600);
delay(1000);
Serial.print("Num is: ");
Serial.println(num);
bFunction(&num);
Serial.print("Num is: ");
Serial.println(num);
bFunction(&num);
}
void loop() {
}
void bFunction(int* input){
Serial.print("bFunction says first: ");
Serial.println(*input);
*input = *input + 1;
Serial.print("bFunction says second: ");
Serial.println(*input);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment