Skip to content

Commit

Permalink
turn on I2C/NeoPixel by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ladyada committed Jan 15, 2024
1 parent d092517 commit 59a30d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions variants/feather_nrf52840_sense_tft/variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,16 @@ const uint32_t g_ADigitalPinMap[] = {

void initVariant()
{
// power off LED, neopixel, sensor, tft backlight
// power on neopixel, sensor
pinMode(PIN_LED1, OUTPUT);
pinMode(PIN_NEOPIXEL_POWER, OUTPUT);
pinMode(PIN_SENSOR_POWER, OUTPUT);
pinMode(PIN_TFT_LITE, OUTPUT);

// turn off LED, tft backlight
ledOff(PIN_LED1);
digitalWrite(PIN_NEOPIXEL_POWER, LOW);
digitalWrite(PIN_SENSOR_POWER, LOW);
digitalWrite(PIN_NEOPIXEL_POWER, HIGH);
digitalWrite(PIN_SENSOR_POWER, HIGH);
digitalWrite(PIN_TFT_LITE, LOW);
}

6 changes: 3 additions & 3 deletions variants/feather_nrf52840_sense_tft/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ extern "C"
#define LED_RED PIN_LED1
#define LED_BLUE PIN_LED1

#define LED_STATE_ON 1 // State when LED is litted
#define LED_STATE_ON 1 // State when LED is lit

// Buttons
#define PIN_BUTTON1 (3)
Expand Down Expand Up @@ -83,8 +83,8 @@ static const uint8_t A7 = PIN_A7 ;
/*
* Serial interfaces
*/
#define PIN_SERIAL1_RX (0)
#define PIN_SERIAL1_TX (1)
#define PIN_SERIAL1_RX (1)
#define PIN_SERIAL1_TX (0)

/*
* SPI Interfaces
Expand Down

0 comments on commit 59a30d4

Please sign in to comment.