Forum

ESP32 not connectin...
 
Notifications
Clear all

ESP32 not connecting to Uno v2 via UART

2 Posts
2 Users
0 Reactions
149 Views
Forum 1
(@iashesh)
New Member
Joined: 4 months ago
Posts: 1
Topic starter  

Hi,

I have a SOLO UNO v2 motor controller connected to a SparkFun IoT RedBoard - ESP32 Development Board via UART/serial. I am having issues with the esp32 connecting to the UNO, the esp32 keeps outputting an error and rebooting. I have it connected via the rx0 and tx0 on the esp32. 

I would appreciate some help regarding this,

Best Regards!

#include "SOLOMotorControllersUart.h"

// instantiate a SOLO object:
SOLOMotorControllers *SOLO_Obj1;

void setup() {
  Serial.begin(115200);
  Serial1.begin(115200);
  
  // Initialize the SOLO object
  int SOLOdeviceAddress = 0;
  SOLO_Obj1 = new SOLOMotorControllersUart(SOLOdeviceAddress, Serial1, SOLOMotorControllers::UartBaudrate::RATE_115200,1,1);

  Serial.println("\n Trying to Connect To SOLO");

  delay(1000);

  // wait here till communication is established
  while (SOLO_Obj1->CommunicationIsWorking() == false)
  {
    delay(500);
  }

  Serial.println("\n Communication Established successfully!");
}

void loop() {
}

Here is what is outputted to the serial monitor.

12:15:15.075 -> ets Jul 29 2019 12:21:46
12:15:15.075 -> 
12:15:15.075 -> rst:0x8 (TG1WDT_SYS_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
12:15:15.107 -> configsip: 0, SPIWP:0xee
12:15:15.107 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
12:15:15.107 -> mode:DIO, clock div:1
12:15:15.107 -> load:0x3fff0030,len:1344
12:15:15.107 -> load:0x40078000,len:13964
12:15:15.107 -> load:0x40080400,len:3600
12:15:15.107 -> entry 0x400805f0

 


   
Quote
SOLO_Francesco
(@solo_francesco)
Chief Member
Joined: 2 years ago
Posts: 38
 

We test the code on Arduino Mega v2 and if you put this code line:

SOLO_Obj1 = new SOLOMotorControllersUart(SOLOdeviceAddress, Serial1);

every thing work fine.

 

For instance:

- We test with our library version 5.2.0

- We set as line 4 this: SOLOMotorControllersUart *SOLO_Obj1;  

- Setting _millisecondsTimeout at 1 and _packetFailureTrialAttempts at 1 will reduce the comunication quality  (is the major change between your and our suggestion code)


   
ReplyQuote
Share: