user78174: When I call the delay() function on the ATtiny84 micro, it delays for the expected time, until I call the init() function on an RH_ASK object. After this, the micro seems to freeze.
#include <RH_ASK.h>
RH_ASK driver();

void setup() {
    delay(100); // works ok
    driver.init();
    delay(100); // freezes a long time (or maybe forever?)
}


user78174: After reading the source code, RH_ASK.cpp, I found a commented out macro.
// RH_ASK on ATtiny8x uses Timer 0 to generate interrupts 8 times per 
// bit interval. Timer 0 is used by Arduino platform for millis()/micros() 
// which is used by delay()
// Uncomment the define RH_ASK_ATTINY_USE_TIMER1 bellow, if you want to use 
// Timer 1 instead of Timer 0 on ATtiny
// Timer 1 is also used by some other libraries, e.g. Servo. Alway check 
// usage of Timer 1 before enabling this.
// Should be moved to header file
//#define RH_ASK_ATTINY_USE_TIMER1

In other words, the default behaviour of RadioHead ASK init() is to use Timer 0, which causes delay() (which uses millis()/micro()) to behave incorrectly.
To fix: Tell RadioHead ASK to use Timer 1. Because the RH_ASK_ATTINY_USE_TIMER1 macro is in the source and not the header (for now), you have to modify the actual RadioHead ASK source file, RH_ASK.cpp*. Un-comment the line #define RH_ASK_ATTINY_USE_TIMER1 which will use Timer 1 instead of Timer 0. Re-compile your code, and delay() should start working properly again.
* RH_ASK.cpp can be found in %USERPROFILE%\Documents\Arduino\libraries\RadioHead on Windows, if you installed RadioHead via the Arduino IDE library manager.

78174: <p>When I call the <code>delay()</code> function on the ATtiny84 micro, it delays for the expected time, until I call the <code>init()</code> function on an <code>RH_ASK</code> object. After this, the micro seems to freeze.</p>
<pre><code>#include &lt;RH_ASK.h&gt;
RH_ASK driver();

void setup() {
    delay(100); // works ok
    driver.init();
    delay(100); // freezes a long time (or maybe forever?)
}
</code></pre>
 78174: <p>After reading the source code, <code>RH_ASK.cpp</code>, I found a commented out macro.</p>
<pre><code>// RH_ASK on ATtiny8x uses Timer 0 to generate interrupts 8 times per 
// bit interval. Timer 0 is used by Arduino platform for millis()/micros() 
// which is used by delay()
// Uncomment the define RH_ASK_ATTINY_USE_TIMER1 bellow, if you want to use 
// Timer 1 instead of Timer 0 on ATtiny
// Timer 1 is also used by some other libraries, e.g. Servo. Alway check 
// usage of Timer 1 before enabling this.
// Should be moved to header file
//#define RH_ASK_ATTINY_USE_TIMER1
</code></pre>
<p>In other words, the default behaviour of RadioHead ASK <code>init()</code> is to use <strong>Timer 0</strong>, which causes <code>delay()</code> (which uses <code>millis()</code>/<code>micro()</code>) to behave incorrectly.</p>
<p><strong>To fix:</strong> Tell RadioHead ASK to use <strong>Timer 1</strong>. Because the <code>RH_ASK_ATTINY_USE_TIMER1</code> macro is in the source and not the header (for now), you have to modify the actual RadioHead ASK source file, <code>RH_ASK.cpp</code>*. Un-comment the line <code>#define RH_ASK_ATTINY_USE_TIMER1</code> which will use <strong>Timer 1</strong> instead of <strong>Timer 0</strong>. Re-compile your code, and <code>delay()</code> should start working properly again.</p>
<p>* <code>RH_ASK.cpp</code> can be found in <code>%USERPROFILE%\Documents\Arduino\libraries\RadioHead</code> on Windows, if you installed RadioHead via the Arduino IDE library manager.</p>
