Skip to content

Commit d523210

Browse files
authored
Merge pull request #44 from sysshad/master
Added ESP32 support in example InterruptRotator.ino
2 parents 2b6825a + 1c97ccc commit d523210

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

examples/InterruptRotator/InterruptRotator.ino

Lines changed: 5 additions & 1 deletion
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 ESP32 with input signals on pins 35 and 37
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)