user10960: I'm experimenting with a Nano, and trying to trigger an action around twice a day. I'm aware that it's not super accurate, but I don't really mind, as long as it's in the ballpark.
I've tried using the SimpleTimer library but I'm running into an issue because it takes milliseconds as an int, and 12 hours is 43200000 (larger than 32,767 max). Is there another library, or another technique I can use for this?

user19409: You have 2 other options to the setInterval() function:

delay() (blocking)
millis() (non-blocking)

Both of these functions deal with an unsigned long which has 32 bits = (2^32)-1 = 4,294,967,295. Doing the sums (and considering that both are in milliseconds), this will last for 49 days and 17 hours.
1 second = 1000 milliseconds
1 minute = 60 seconds
1 hour = 60 minutes
12 hours = 12 * 60 * 60 * 1000 = 43,200,000
delay(x) will delay for x number of milliseconds.  The delay function is blocking, meaning that while it is running/delaying you can't do any other task. The code would be:
delay(43200000);

millis() on the other hand is non-blocking and returns the number of milliseconds since power-up.  This can be implemented with the following code:
#define TWELVE_HRS 43200000UL
unsigned long startTime;

setup()
{
  startTime = millis();
}

loop()
{
  if (millis() - startTime > TWELVE_HRS)
  {
    // Put your code that runs every 12 hours here

    startTime = millis();
  }
}


user10794: 
I'm running into an issue because it takes milliseconds as an int ...

No it doesn't. Look at the function prototype:

int setInterval(long d, timer_callback f);


Call function f every d milliseconds. The callback function must be declared as void f().


The interval d is a long. The int you see is the return value from the function, not the interval.

user16085: Set the timer for every hour, which is within the limit. In your action, keep a static int, initialized to zero, which you increment each time. When it ==12, do the thing you want to do and reset your int back to zero.

10960: <p>I'm experimenting with a Nano, and trying to trigger an action around twice a day. I'm aware that it's not super accurate, but I don't really mind, as long as it's in the ballpark.</p>

<p>I've tried using the <a href="http://playground.arduino.cc/Code/SimpleTimer" rel="nofollow noreferrer">SimpleTimer library</a> but I'm running into an issue because it takes milliseconds as an int, and 12 hours is 43200000 (larger than 32,767 max). Is there another library, or another technique I can use for this?</p>
 19409: <p>You have 2 other options to the <code>setInterval()</code> function:</p>

<ul>
<li><code>delay()</code> (blocking)</li>
<li><code>millis()</code> (non-blocking)</li>
</ul>

<p>Both of these functions deal with an <code>unsigned long</code> which has 32 bits = (2^32)-1 = 4,294,967,295. Doing the sums (and considering that both are in milliseconds), this will last for 49 days and 17 hours.</p>

<p>1 second = 1000 milliseconds<br>
1 minute = 60 seconds<br>
1 hour = 60 minutes<br>
12 hours = 12 * 60 * 60 * 1000 = 43,200,000</p>

<p><code>delay(x)</code> will delay for x number of milliseconds.  The delay function is blocking, meaning that while it is running/delaying you can't do any other task. The code would be:</p>

<pre><code>delay(43200000);
</code></pre>

<p><code>millis()</code> on the other hand is non-blocking and returns the number of milliseconds since power-up.  This can be implemented with the following code:</p>

<pre><code>#define TWELVE_HRS 43200000UL
unsigned long startTime;

setup()
{
  startTime = millis();
}

loop()
{
  if (millis() - startTime &gt; TWELVE_HRS)
  {
    // Put your code that runs every 12 hours here

    startTime = millis();
  }
}
</code></pre>
 10794: <blockquote>
  <p>I'm running into an issue because it takes milliseconds as an int ...</p>
</blockquote>

<p>No it doesn't. Look at the function prototype:</p>

<hr>

<pre><code>int setInterval(long d, timer_callback f);
</code></pre>

<blockquote>
  <p>Call function f every d milliseconds. The callback function must be declared as void f().</p>
</blockquote>

<hr>

<p>The interval <code>d</code> is a long. The <code>int</code> you see is the return value from the function, not the interval.</p>
 16085: <p>Set the timer for every hour, which is within the limit. In your action, keep a <code>static int</code>, initialized to zero, which you increment each time. When it <code>==12</code>, do the thing you want to do and reset your <code>int</code> back to zero.</p>
