Browse Source

fix pin issues

try-fix-comms-errors
Alex Mikhalev 6 years ago
parent
commit
0e537a39d1
  1. 4
      main/ugv_comms.cc
  2. 4
      main/ugv_io_gps.cc
  3. 4
      main/ugv_io_mpu.cc
  4. 5
      main/ugv_main.cc

4
main/ugv_comms.cc

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

4
main/ugv_io_gps.cc

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

4
main/ugv_io_mpu.cc

@ -9,8 +9,8 @@
namespace ugv { namespace ugv {
namespace io { namespace io {
static constexpr gpio_num_t MPU_SDA = GPIO_NUM_2; static constexpr gpio_num_t MPU_SDA = GPIO_NUM_12;
static constexpr gpio_num_t MPU_SCL = GPIO_NUM_3; 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::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 mpud::gyro_fs_t MPU_GYRO_FS = mpud::GYRO_FS_500DPS;
static constexpr float MPU_MAG_TO_FLUX = (4912.f) / (32760.f); static constexpr float MPU_MAG_TO_FLUX = (4912.f) / (32760.f);

5
main/ugv_main.cc

@ -17,7 +17,10 @@ static const char *TAG = "ugv_main";
U8G2 *oled; U8G2 *oled;
void setup_oled(void) { 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->initDisplay();
oled->clearDisplay(); oled->clearDisplay();
oled->setPowerSave(false); oled->setPowerSave(false);

Loading…
Cancel
Save