Skip to content

Commit ee648e2

Browse files
authored
Added ESP32 support in example InterruptRotator.ino
Added ESP32 support.
1 parent 5667576 commit ee648e2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

examples/InterruptRotator/InterruptRotator.ino

+5-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
#define PIN_IN1 D5
3939
#define PIN_IN2 D6
4040

41+
#elif defined(ESP32)
42+
// Example for ESP8266 NodeMCU with input signals on pin D5 and D6
43+
#define PIN_IN1 35
44+
#define PIN_IN2 37
4145
#endif
4246

4347
// A pointer to the dynamic created rotary encoder instance.
@@ -51,7 +55,7 @@ void checkPosition()
5155
encoder->tick(); // just call tick() to check the state.
5256
}
5357

54-
#elif defined(ESP8266)
58+
#elif defined(ESP8266) || defined(ESP32)
5559
/**
5660
* @brief The interrupt service routine will be called on any change of one of the input signals.
5761
*/

0 commit comments

Comments
 (0)