Skip to content

Serial port #85

Closed
Closed
@Lizethgm

Description

@Lizethgm

I have been trying to test the low power along with the serial ports.
I am using the Generic STM32WL series board "Generic WLE5CCUx"
My program is this:

#include "STM32LowPower.h"

String command = "Hello";

void setup() {
  Serial.begin(2400);
  Serial1.begin(2400);
  LowPower.begin();
}

void loop() {
  readMeter();
  delay(500);
  LowPower.deepSleep(10 * 1000);
}

void readMeter()
{  
  Serial1.print(command);
  while(Serial1.available()> 0) 
  {
    Serial.println(Serial1.read());
  }
}

I was trying to test it with this code but it only sends the "Hello" command the second time and that's it. If I remove the low power it works correctly.
How can I make the command "Hello" that I set continue to be sent?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions