-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ESP32 wiring for TTGO T-Display board #73
- Loading branch information
Showing
4 changed files
with
39 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,43 @@ | ||
/* | ||
* Pano Controller Configuration File for ESP32 board | ||
* https://github.com/espressif/arduino-esp32/blob/master/docs/esp32_pinmap.png | ||
* https://desire.giesecke.tk/index.php/2018/07/06/reserved-gpios/ | ||
* Already wired in https://github.com/Xinyuan-LilyGO/TTGO-T-Display | ||
* 19 TFT_MOSI | ||
* 18 TFT_SCLK | ||
* 5 TFT_CS | ||
* 16 TFT_DC | ||
* 4 TFT_BL | ||
* 21 SDA | ||
* 22 SCL | ||
* 34 ADC_IN | ||
* 35 BUTTON1 | ||
* 0 BUTTON2 | ||
* 14 ADC_POWER | ||
* | ||
* Reserved GPIOs | ||
* not as inputs: 0, 2, 6-11, 12, 15, 16, 17 | ||
* not as outputs: 6-11, 16, 17 34-39 | ||
* Reference https://desire.giesecke.tk/index.php/2018/07/06/reserved-gpios/ | ||
*/ | ||
#include <Arduino.h> | ||
|
||
/* SPI (for display) | ||
SPI2 and SPI3 are general purpose SPI controllers, sometimes referred to as HSPI and VSPI | ||
SDA = IO 23 | ||
SCLK = IO 18 | ||
D/C = IO 21 | ||
RST = IO 22 | ||
CS = IO 5 | ||
*/ | ||
|
||
// Camera shutter controls | ||
#define CAMERA_FOCUS GPIO_NUM_16 | ||
#define CAMERA_SHUTTER GPIO_NUM_17 | ||
#define CAMERA_FOCUS GPIO_NUM_37 | ||
#define CAMERA_SHUTTER GPIO_NUM_38 | ||
|
||
// Battery measurement pin R1/R2 | ||
#define BATTERY GPIO_NUM_34 //34 # ADC1 CH0 | ||
#define BATTERY GPIO_NUM_36 // ADC0 | ||
|
||
// MPU (accel/gyro) | ||
// GPIO_NUM_21 I2C SDA | ||
// GPIO_NUM_22 I2C SCL | ||
#define MPU_INT GPIO_NUM_2 | ||
#define MPU_VCC GPIO_NUM_4 | ||
#define MPU_INT GPIO_NUM_13 | ||
#define MPU_VCC GPIO_NUM_12 | ||
|
||
// Future devices | ||
//#define COMPASS_DRDY xx | ||
|
||
// Stepper drivers control | ||
#define DIR GPIO_NUM_27 | ||
#define VERT_STEP GPIO_NUM_25 | ||
// Stepper drivers control. nENABLE, DIR are connected to both drivers | ||
#define nENABLE GPIO_NUM_33 | ||
#define DIR GPIO_NUM_27 | ||
#define VERT_STEP GPIO_NUM_25 | ||
#define HORIZ_STEP GPIO_NUM_26 | ||
|
||
// this should be hooked up to nENABLE on both drivers | ||
#define nENABLE GPIO_NUM_14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters