INT

Hello, is there a way to do an integer that lasts throughout the whole code? For example when you use and int in setup you can't use it again. If there a type of integer that would allow me to do it again?

Just put it at the top of your code, that will make it a global variable :)

http://arduino.cc/en/Reference/scope

guix: Just put it at the top of your code, that will make it a global variable :)

http://arduino.cc/en/Reference/scope

Thank you!

NP :)

After re-reading your post, I realize you may be interested by the "static" keyword, example:

void loop()
{
  static int i;
  i++;
}

Using static, the i variable will not be reset to 0 every loop()