Skip to content

Serial1.read() not functional #2478

@AkhileshThorat

Description

@AkhileshThorat

Hardware:

Board: ESP32 Dev Module
Core Installation version: 1.0.1
IDE name: Arduino IDE
Flash Frequency: 40Mhz,DIO mode
PSRAM enabled: yes
Upload Speed: 921600
Computer OS: Windows 10

Description:

Trying to implement ModBusRTU on Serial1(rx=9,tx=10).Porting code from Atmega 2560 to ESP32 for Modbus protocol.Sending data successfully but fails to read data on the same serial port.

Sketch:

//Change the code below by your sketch
Minimal sketch as follows:

Serial1.begin(19200);//Initialisation

while(Serial1.available()) //reading Modbus response frame
  {
    mbresponse[retval++]=(char)Serial1.read();
  }
### Debug Messages:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: StaleIssue is stale stage (outdated/stuck)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions