I want to use the SoftTimer library from Prampec on a NodeMCU.
I can compile and create task that uses pins D0..D4 but when I try to use pins D5-D8 nothing append.
I compile under Arduino IDE version 1.8.13
I downloaded the library from https://github.com/prampec/arduino-softtimer
and I'm using the library example: SoftTimer2BlinkTask1.ino; modified to feed the ESP's watchdog.
The circuit: only the NodeMCU powered thru USB and 1 (Led & Resistor) to GND
Program:
#include <SoftTimer.h>
#include <BlinkTask.h>
#define LED_PIN 2
void feedWatchdog(Task* me);
// -- On for 1000ms, off for the same time, and repeat it forever.
BlinkTask hartbeat(LED_PIN, 500);
Task watchdogFeederTask(1000, feedWatchdog);
void setup() {
hartbeat.start();
SoftTimer.add(&watchdogFeederTask);
}
void feedWatchdog(Task* me) {
ESP.wdtFeed();
}
I can blink the led using #define LED_PIN (16,5,4,0,2) but the led doesn't blink using pins (14,12,13,15)
I also tested the same library (SoftTimer ) on an Arduino UNO and it works for all the pins.
Is there something special about the ESP pins that I don't know?
Thanks