Error Trying to put the Boron to sleep (ultra_low_power)

I have five particle Boron’s that I’m looking to put to sleep whenever power drops below 15% during times of less power generation. I use the web IDE and I keep getting errors I do not understand, since my code is straight from the particle docs. Is there something I am not importing? compiling the code fails to begin with so I’m not sure it can’t be my device OS.

Here’s is the code to put the boron to sleep, as simple as it is :

SystemSleepConfiguration config;

This image shows the errors I’m getting.

I am not experienced with this, so any help will be appreciated.


@grimm, are you targeting your Boron on the Web IDE. There should be a yellow star next to the device name in the IDE.

I know that is how you mark an active device, but I’m not even flashing to the device yet, all I did was “verify” on the web IDE not flash.

@grimm, can you “share this version” and post the link so we can take a look?

pardon my understanding, do you mean I should share my code? what do you mean?

you don’t need to flash but even for verify you have to select appropriate device
for example if you try to verify when Photon is selected the compiler will throw this error

also looks like you miss somewhere in your code a semicolon ";"

on the Web IDE select share this revision and then copy the link and paste here

1 Like

Yes, share your code if you can.

Oh my, this is not even a beginner mistake. Its pathetic. Thank you very much. this worked.

my code is 500 lines long. I have been using it for a while now, and I needed to add the sleep part. Turns out @dreamER is right. His answer is a solution. Thank you very much for the eagerness to help me though. Much appreciated. Stay blessed.


When you are using Web IDE you can use the SHARE THIS REVISION feature to share even rather long projects with multiple files and libraries included.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.