Can sleep mode System.sleep(wakeUpPin, edgeTriggerMode, seconds) work without time?
(I want to wake the electron up everytime it senses the acceleration which greater than the threshold)
About the WKP, I don’t understand how this work? I think that the system will wake up every time it senses something from sensor(in my case it accelerometer) , Does threshold have the effect on WKP?
How setupLowpowermode work?, if I set the electron to this low power mode, how can I change the mode without using System.sleep(wakeUpPin, edgeTriggerMode, seconds)?
4.this is about GPS. Does gpsOn(); mean turn off gps and gpsOff(); means turn on ?
In all cases, if the wake up time seconds is omitted or 0, the application will keep sleeping until the wakeUpPin triggers (if specified) or the user hits the RESET button.
A RISING, FALLING, or CHANGE-ingslope will be detected. Thresholds will not matter and should be checked afterwards. Alternatively, configure your peripheral to send a signal only when its pre-configured threshold is reached.
Not sure what you're referring to, have you got a link?
if you look at the names, you can probably guess what they're supposed to do. If not, a link to whatever it is you're referring to would be great.
@Moors7, the WKP pin will ONLY wake the device from deep sleep using a RISING edge. This is as defined in the STM32F205 specs. If the WKP pin is use for waking for non deep sleep, then it behaves as you described.
Well , because of the description, I’m confused. And, in the library it said that gps Off() means HIGH which I understand that high mean let that pin work. I’m still confused.
HIGH does not mean active. A lot of devices have "active LOW" pins.
e.g. the SlaveSelect pins on SPI devices are active LOW, meaning the respective slave is enabled/selected by pulling the pin LOW.