I'm building a project that uses the ItsyBitsy MO Express.
I'm using the RocketScream LowPower library to put it into standby power mode, and waking it with an interrupt attached to Pin2.
Before I put it into standby power mode, I can read all the messages I have built into the code, using Serial.print functions. After I put it into standby power mode, and continuing after I wake it up, I have been unable to get the Serial.print functions to work.
I have tried reissuing the Serial.begin (9600) and USBDevice.attach instructions without success.
Does anyone know how to make this work?
Thanks.
ItsyBitsy Serial after waking up from Standby
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- GuyBooth
- Posts: 32
- Joined: Wed Sep 08, 2021 3:56 pm
- mikeysklar
- Posts: 13944
- Joined: Mon Aug 01, 2016 8:10 pm
Re: ItsyBitsy Serial after waking up from Standby
Does it help if you add a:
before dropping into low power mode?
Also would it help to close the Arduino Serial Monitor (or whatever you are watching the messages with) and only open it after coming out of low power mode?
Code: Select all
Serial.flush();
Also would it help to close the Arduino Serial Monitor (or whatever you are watching the messages with) and only open it after coming out of low power mode?
- GuyBooth
- Posts: 32
- Joined: Wed Sep 08, 2021 3:56 pm
Re: ItsyBitsy Serial after waking up from Standby
Serial.flush(); didn't make any difference.
The one thing that worked was to close the serial monitor before going into low power mode, and only opening it after powering back up.
No other variations of closing the serial monitor, powering down, opening the serial monitor and powering back up worked - e.g. leaving the serial monitor open when going into low power mode, closing it while in low power mode, and opening it again after powering back up.
Is there a way to close the Serial monitor from within the program?
The one thing that worked was to close the serial monitor before going into low power mode, and only opening it after powering back up.
No other variations of closing the serial monitor, powering down, opening the serial monitor and powering back up worked - e.g. leaving the serial monitor open when going into low power mode, closing it while in low power mode, and opening it again after powering back up.
Is there a way to close the Serial monitor from within the program?
- mikeysklar
- Posts: 13944
- Joined: Mon Aug 01, 2016 8:10 pm
Re: ItsyBitsy Serial after waking up from Standby
@GuyBooth,
Let me know if Serial.end() does the trick.
Let me know if Serial.end() does the trick.
https://www.arduino.cc/reference/en/lan ... erial/end/Disables serial communication, allowing the RX and TX pins to be used for general input and output. To re-enable serial communication, call Serial.begin().
- GuyBooth
- Posts: 32
- Joined: Wed Sep 08, 2021 3:56 pm
Re: ItsyBitsy Serial after waking up from Standby
Nice try ...
but unfortunately not successful.
I even added a delay to give it time to shut the serial down before powering down.
but unfortunately not successful.
I even added a delay to give it time to shut the serial down before powering down.
Please be positive and constructive with your questions and comments.