Skip to content

Add support for user defined serial ports #2

@CullenSharp

Description

@CullenSharp

Summary

The ESP32 is capable to using custom pins for serial communication. This functionality should be supported by the library. For example, if I wanted to use GPIO16 and GPIO17 for serial communication via UART, I should be able to pass those pin numbers as arguments to the HLW8032.begin() method.

Tasks

  • Update HLW8032.begin() prototype to accept GPIO pins as ints
  • Update HLW8032.begin() source to implement this (see example)

See ESP32 UART Communication for details. The relevant snippet is below.

mySerial.begin(GPS_BAUD, SERIAL_8N1, RX_GPIO, TX_GPIO);

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions