swsertest.ino 417 B

123456789101112131415161718192021222324252627
  1. #include <TasmotaSerial.h>
  2. TasmotaSerial swSer(14, 12);
  3. void setup() {
  4. Serial.begin(115200);
  5. swSer.begin();
  6. Serial.println("\nTasmota serial test started");
  7. for (char ch = ' '; ch <= 'z'; ch++) {
  8. swSer.write(ch);
  9. }
  10. swSer.println("");
  11. }
  12. void loop() {
  13. while (swSer.available() > 0) {
  14. Serial.write(swSer.read());
  15. }
  16. while (Serial.available() > 0) {
  17. swSer.write(Serial.read());
  18. }
  19. }