I wonder if the DigiKeyboard.h library is compatible with WDT on an attiny85?
Because I can't get the attiny freez to reboot,
I have to remove the power supply for the reboot attiny
tested with
ide 1.8.12 ide 1.8.13
ATTinyCore 1.5.2
with attiny85 16mhz int fuse F1 DF FF usbasp prog no bootloader just test wdt
with digispark 16mhz int fuse F1 DF FF usbasp prog no bootloader for pc
tested several lib DigiKeyboard
Simple test to activate or not the DigiKeyboard.h
Could I be making a mistake?
Thanks in advance for the response
Code: Select all
//test with
//exemple attiny85 16mhz fuse internal F1 DF FF
//exemple digispark 16mhz fuse internal F1 DF FF
//programming isp usbasp
//ide 1.8.12 or 1.8.13 ATTinyCore 1.5.2
#include <avr/wdt.h>
#include "DigiKeyboard.h" // if active DigiKeyboard.h wdt not reboot after x seconde freez mcu
int led = 1; //attiny85 1 / attiny88 0 / arduino 13
void setup() {
wdt_enable(WDTO_4S);//
pinMode(led, OUTPUT);
for(int test_reboot = 0 ; test_reboot < 4 ; test_reboot++)
{
digitalWrite(led, HIGH);
delay(200);
digitalWrite(led, LOW);
delay(200);
}
}
void loop() {
// no need for reboot test only with digispark
// DigiKeyboard.sendKeyStroke(0);
// DigiKeyboard.print("hello");
while (1)
{
}
}