Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion to Enable Universal Serial Compatibility #5

Open
NatanaelJose opened this issue Jan 17, 2024 · 1 comment
Open

Suggestion to Enable Universal Serial Compatibility #5

NatanaelJose opened this issue Jan 17, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@NatanaelJose
Copy link

Hello,

I hope everything is going well. I'm a user of Sense air S8 sensor, and I have a suggestion that could benefit many users facing challenges with serial communication on boards that don't have direct support for Softwareserial or HardwareSerial.

Suggestion: Implementation of EspSoftwareSerial for Boards Without Support

Currently, some users of boards, such as ESP32 LILYGO®LoRa32 V2.1_1.6, may encounter limitations with Softwareserial or HardwareSerial libraries. A valuable alternative would be the implementation of the EspSoftwareSerial library to provide a more flexible and comprehensive solution.

Implementation Suggestion:

  1. Add support for the EspSoftwareSerial library in the installation instructions or in the project's README. Additionally, provide a usage example to guide users in implementing EspSoftwareSerial in their projects.

  2. Usage Example:

    #include "s8_uart.h"
    #include <SoftwareSerial.h> //EspSoftwareSerial include
    
    EspSoftwareSerial::UART S8_serial;
    S8_UART *sensor_S8;
    S8_sensor sensor;
    
    void setup() {
      Serial.begin(9600);
      while (!Serial) {
      }
      // Initialize S8 sensor
      S8_serial.begin(S8_BAUDRATE, EspSoftwareSerial::SWSERIAL_8N1, 21, 22);
      sensor_S8 = new S8_UART(S8_serial);
    }
    
    void loop() {
      sensor.co2 = sensor_S8->get_co2();
      Serial.print("CO2 value = ");
      Serial.print(sensor.co2);
      Serial.println(" ppm");
      delay(1000);
    }
    

Contribution to the Community:
The inclusion of EspSoftwareSerial can provide a broader solution for users of various boards, improving usability and accessibility in projects that require serial communication.

Thank you for your attention and consideration. I am available to provide more information or clarify any doubts.

Best regards,
Natanael José

@jcomas
Copy link
Owner

jcomas commented Jan 20, 2024

Thanks for the example. I have "SoftwareSerial" in example https://github.com/jcomas/S8_UART/blob/main/examples/co2/co2.cpp but maybe not valid for ESP32. I'll review it for the next release.

@jcomas jcomas added the enhancement New feature or request label Jan 20, 2024
@jcomas jcomas self-assigned this Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants