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 :
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 ";"
UPDATE:
on the Web IDE select share this revision and then copy the link and paste here
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.