File tree 2 files changed +9
-0
lines changed
variants/adafruit_feather_esp32s2
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 25
25
#define NEOPIXEL_NUM 1 // number of neopixels
26
26
#define NEOPIXEL_POWER 21 // power pin
27
27
#define NEOPIXEL_POWER_ON HIGH // power pin state when on
28
+ #define PIN_I2C_POWER 7 // Ppwer pin for I2C
28
29
29
30
static const uint8_t SDA = 3 ;
30
31
static const uint8_t SCL = 4 ;
Original file line number Diff line number Diff line change @@ -31,7 +31,15 @@ extern "C" {
31
31
// Initialize variant/board, called before setup()
32
32
void initVariant (void )
33
33
{
34
+ // This board has a power control pin, and we must set it to output and high
35
+ // in order to enable the NeoPixels.
36
+ pinMode (NEOPIXEL_POWER, OUTPUT);
37
+ digitalWrite (NEOPIXEL_POWER, HIGH);
34
38
39
+ // This board has a power control pin, and we must set it to output and low
40
+ // in order to enable the I2C port.
41
+ pinMode (PIN_I2C_POWER, OUTPUT);
42
+ digitalWrite (PIN_I2C_POWER, LOW);
35
43
}
36
44
37
45
}
You can’t perform that action at this time.
0 commit comments