fix pin issues

This commit is contained in:
Alex Mikhalev 2019-01-23 19:24:06 -08:00
parent 82ea623747
commit 0e537a39d1
4 changed files with 10 additions and 7 deletions

View File

@ -59,8 +59,8 @@ void CommsClass::Init() {
#else
e32::Config lora_config;
lora_config.uart_port = UART_NUM_2;
lora_config.uart_rx_pin = 10;
lora_config.uart_rx_pin = 11;
lora_config.uart_rx_pin = 13;
lora_config.uart_tx_pin = 15;
ret = lora.Init(lora_config);
if (ret != ESP_OK) {
const char *error_name = esp_err_to_name(ret);

View File

@ -12,8 +12,8 @@ namespace io {
static constexpr size_t GPS_BUF_SIZE = 1024;
static constexpr uart_port_t GPS_UART = UART_NUM_1;
static constexpr int GPS_UART_TX_PIN = 17;
static constexpr int GPS_UART_RX_PIN = 23;
static constexpr int GPS_UART_TX_PIN = 25;
static constexpr int GPS_UART_RX_PIN = 26;
static constexpr int GPS_UART_BAUD = 9600;
static constexpr size_t GPS_UART_RX_BUF_SIZE = 1024;
static constexpr size_t GPS_UART_TX_BUF_SIZE = 0;

View File

@ -9,8 +9,8 @@
namespace ugv {
namespace io {
static constexpr gpio_num_t MPU_SDA = GPIO_NUM_2;
static constexpr gpio_num_t MPU_SCL = GPIO_NUM_3;
static constexpr gpio_num_t MPU_SDA = GPIO_NUM_12;
static constexpr gpio_num_t MPU_SCL = GPIO_NUM_14;
static constexpr mpud::accel_fs_t MPU_ACCEL_FS = mpud::ACCEL_FS_2G;
static constexpr mpud::gyro_fs_t MPU_GYRO_FS = mpud::GYRO_FS_500DPS;
static constexpr float MPU_MAG_TO_FLUX = (4912.f) / (32760.f);

View File

@ -17,7 +17,10 @@ static const char *TAG = "ugv_main";
U8G2 *oled;
void setup_oled(void) {
oled = new U8G2_SSD1306_128X64_NONAME_F_HW_I2C(U8G2_R0, 16, 15, 4);
// For Heltec ESP32 LoRa
// oled = new U8G2_SSD1306_128X64_NONAME_F_HW_I2C(U8G2_R0, 16, 15, 4);
// For wemos Lolin ESP32
oled = new U8G2_SSD1306_128X64_NONAME_F_HW_I2C(U8G2_R0, 16, 4, 5);
oled->initDisplay();
oled->clearDisplay();
oled->setPowerSave(false);