user14790: The core I use is this one
The chip I use is an ATtiny85
I run this using the Arduino IDE 1.8.2
RadioHead ASK library (slimmed down)  
What I want to do is:  

deep sleep
wake up every minute
turn on sensor
take measurement
transmit data
back to sleep

This works when I test it seperatly, where it goes awry is when I combine RadioHead with WDT and then try to use a delay. This always hangs.
Probably a timer issue, I am looking for a work around.
I need the delay because I need to start the sensor, wait .5 sec and then take a measurement. Maybe I should give the ATtiny85 just some job to keep it busy for 0.5 sec?
This is working code, when I uncomment //  driver.init(); it will fail.
// RadioHead ASK
#include <RH_ASK.h>

// Sleep
#include <avr/sleep.h>
#include <avr/wdt.h>

#ifndef cbi
  #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif
#ifndef sbi
  #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
#endif

// Absolute reference PB to overcome inter-IDE issues
#define T_PIN 1 // transmission
#define L_PIN 3 // optional LED pin
#define S1 A2
#define S2 A1
#define BAUD 2000

// Baud rate, receiver, transmitter
RH_ASK driver(BAUD, 9, T_PIN); // pin 9 is non existent

// Watchdog
volatile boolean f_wdt = 1;

ISR(WDT_vect) {
  f_wdt=1;
}

// Sleep
void system_sleep() {
  cbi(ADCSRA,ADEN);                    // switch Analog to Digitalconverter OFF

  set_sleep_mode(SLEEP_MODE_PWR_DOWN); // sleep mode is set here
  sleep_enable();

  sleep_mode();                        // System sleeps here

  sleep_disable();                     // System continues execution here when watchdog timed out
  sbi(ADCSRA,ADEN);                    // switch Analog to Digitalconverter ON
}

// Setup for Watchdog
void setup_watchdog(int ii) {
  byte bb;
  int ww;
  if (ii > 9 ) ii=9;
  bb=ii & 7;
  if (ii > 7) bb|= (1<<5);
  bb|= (1<<WDCE);
  ww=bb;

  MCUSR &= ~(1<<WDRF);
  // start timed sequence
  WDTCR |= (1<<WDCE) | (1<<WDE);
  // set new watchdog timeout value
  WDTCR = bb;
  WDTCR |= _BV(WDIE);
}

void setup() {
//  driver.init();
  setup_watchdog(8);
}

void loop()
{
  if (f_wdt==1) { 
    pinMode(0, OUTPUT);
    digitalWrite(0, HIGH);
    delay(500);
    digitalWrite(0, LOW);
    delay(500);
    system_sleep();
  }
}


user2881: The RH_ASK library uses timer0, which is also used for millis and delay.
Quick workaround is to use the standard AVR delay instead.
#include <util/delay.h>

...

_delay_ms(500)


14790: <p>The core I use is <a href="https://github.com/SpenceKonde/ATTinyCore" rel="nofollow noreferrer">this one</a><br>
The chip I use is an ATtiny85<br>
I run this using the Arduino IDE 1.8.2<br>
<a href="https://github.com/Thijxx/TinyHead" rel="nofollow noreferrer">RadioHead ASK library</a> (slimmed down)  </p>

<p>What I want to do is:  </p>

<ul>
<li>deep sleep</li>
<li>wake up every minute</li>
<li>turn on sensor</li>
<li>take measurement</li>
<li>transmit data</li>
<li>back to sleep</li>
</ul>

<p>This works when I test it seperatly, where it goes awry is when I combine RadioHead with WDT and then try to use a delay. This always hangs.</p>

<p>Probably a timer issue, I am looking for a work around.
I need the delay because I need to start the sensor, wait .5 sec and then take a measurement. Maybe I should give the ATtiny85 just some job to keep it busy for 0.5 sec?</p>

<p>This is working code, when I uncomment <code>//  driver.init();</code> it will fail.</p>

<pre><code>// RadioHead ASK
#include &lt;RH_ASK.h&gt;

// Sleep
#include &lt;avr/sleep.h&gt;
#include &lt;avr/wdt.h&gt;

#ifndef cbi
  #define cbi(sfr, bit) (_SFR_BYTE(sfr) &amp;= ~_BV(bit))
#endif
#ifndef sbi
  #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
#endif

// Absolute reference PB to overcome inter-IDE issues
#define T_PIN 1 // transmission
#define L_PIN 3 // optional LED pin
#define S1 A2
#define S2 A1
#define BAUD 2000

// Baud rate, receiver, transmitter
RH_ASK driver(BAUD, 9, T_PIN); // pin 9 is non existent

// Watchdog
volatile boolean f_wdt = 1;

ISR(WDT_vect) {
  f_wdt=1;
}

// Sleep
void system_sleep() {
  cbi(ADCSRA,ADEN);                    // switch Analog to Digitalconverter OFF

  set_sleep_mode(SLEEP_MODE_PWR_DOWN); // sleep mode is set here
  sleep_enable();

  sleep_mode();                        // System sleeps here

  sleep_disable();                     // System continues execution here when watchdog timed out
  sbi(ADCSRA,ADEN);                    // switch Analog to Digitalconverter ON
}

// Setup for Watchdog
void setup_watchdog(int ii) {
  byte bb;
  int ww;
  if (ii &gt; 9 ) ii=9;
  bb=ii &amp; 7;
  if (ii &gt; 7) bb|= (1&lt;&lt;5);
  bb|= (1&lt;&lt;WDCE);
  ww=bb;

  MCUSR &amp;= ~(1&lt;&lt;WDRF);
  // start timed sequence
  WDTCR |= (1&lt;&lt;WDCE) | (1&lt;&lt;WDE);
  // set new watchdog timeout value
  WDTCR = bb;
  WDTCR |= _BV(WDIE);
}

void setup() {
//  driver.init();
  setup_watchdog(8);
}

void loop()
{
  if (f_wdt==1) { 
    pinMode(0, OUTPUT);
    digitalWrite(0, HIGH);
    delay(500);
    digitalWrite(0, LOW);
    delay(500);
    system_sleep();
  }
}
</code></pre>
 2881: <p>The RH_ASK library uses <code>timer0</code>, which is also used for <code>millis</code> and <code>delay</code>.</p>

<p>Quick workaround is to use the standard AVR delay instead.</p>

<pre><code>#include &lt;util/delay.h&gt;

...

_delay_ms(500)
</code></pre>
