Skip to content

Arduino board support/definition for TTGO T1 (v1.3+) #2740

Closed
@probonopd

Description

@probonopd

A board variant for TTGO-T1 V1.3 is needed.

TTGO-T1 V1.3 is a board based on ESP32 with a TF (microSD) card slot on the board. It is similar to the existing hardware/esp32/1.0.2/variants/ttgo-lora32-v1/pins_arduino.h but instead of LoRa it has microSD on board.

Looking at the pinout diagram my question is, how can we get SD.begin() to use GPIO13 for CS, GPIO15 for MOSI, GPIO2 for MISO, GPIO14 for SCK

static const uint8_t SD_SS    = 13;
static const uint8_t SD_MOSI  = 15;
static const uint8_t SD_MISO  = 2;
static const uint8_t SD_SCK   = 14;

while keeping, for all other devices,

static const uint8_t SS    = 18;
static const uint8_t MOSI  = 23;
static const uint8_t MISO  = 19;
static const uint8_t SCK   = 5;

so that the microSD card can be used while other SPI devices can still be attached to the broken out pins?

Activity

luc-github

luc-github commented on May 3, 2019

@luc-github
Contributor

you just call
SPI.begin(14, 2, 15, 13);
before
`SD.begin();

check void begin(int8_t sck=-1, int8_t miso=-1, int8_t mosi=-1, int8_t ss=-1);
in
https://github.com/espressif/arduino-esp32/blob/master/libraries/SPI/src/SPI.h#L55

probonopd

probonopd commented on May 3, 2019

@probonopd
Author
atanisoft

atanisoft commented on May 3, 2019

@atanisoft
Collaborator

There is also the i2c pins, the built-in LED is on pin 22 and from my experience causes problems for i2c on that default pin.

probonopd

probonopd commented on May 3, 2019

@probonopd
Author

Reopening, since having a board definition file would probably still be a good thing.

atanisoft

atanisoft commented on May 3, 2019

@atanisoft
Collaborator

I'll see if I can create a variant this weekend for this.

atanisoft

atanisoft commented on May 5, 2019

@atanisoft
Collaborator

Submitted a PR for the board definition, opted for override SS/MISO/MOSI/SCK with the SD defaults to make it easier for end users. SS needs to be overridden for all SPI devices usually anyway so it doesn't hurt to share the other pins.

added a commit that references this issue on May 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Arduino board support/definition for TTGO T1 (v1.3+) · Issue #2740 · espressif/arduino-esp32