![]() ![]() And I tell a lie… it does use the loop, and instead uses a state machine to determine whether to get the sensor reading, idle until a total of 20 seconds uptime has elapsed to allow OTA to happen, or go into deepsleep. You just want it to be hanging around for long enough to hear espota sending it the message to start processing OTA…īelow is the code I currently have on a pair of ESP8266s (DigiStump Oak) that have been running well for the last several months… (and is overdue some tweaking as it’s a mismash of example code). As long as there is a delay of some description (even a delay(1)) the ESP will get the yield() call it needs to ensure it doesn’t lock up, as well as encouraging it to idle while not doing anything. # - Send command to controller to differ between flashing and transmitting SPIFFS image. # use it like: python3 espota.py -i -I -p -P -f # This script will push an OTA update to the ESP # Modified since from Matthew O'Gorman () I’m not sure why the timeout would configurable… as going by the espota.py script, it is hard coded for 10 seconds, and doesn’t have a ‘timeout’ option… quite strange! Maybe platformio is running it multiple times? esp8266/Arduino/blob/master/tools/espota.py?utm_source=platformio&utm_medium=docs #!/usr/bin/env python3 I’d probably be tempted to increase the lookup to at least 5 seconds, so 50… I’ll have a look at the code I did to do something similar… basically all in setup instead of loop. Is my look of 30x 100ms enough to catch the OTA (the while loop with ota handle() ). In platformio.ini " upload_flags = -timeout=20" it looks like the unit for this flag is 10sec ? curious, no? It does not always works and I wonder the following: So I launch an upload from atom and just wait… I do not have any “loop()” fonction, like most code with deepsleep, so I set a short loop at the end of my code, this way: mqtt.disconnect() ĪrduinoOTA.begin() // initialisation de l'OTA I added some OTA handling at the end of my code, before going back to sleep. I currently work on a weather sensor that spend most of its time in deepsleep, shortly wake up, measure and send data and goes back to deepsleep. ![]() We evaluated our DeepSleepNet with MASS and Sleep-EDF dataset.įor the MASS dataset, you have to request for a permission to access their dataset.įor the Sleep-EDF dataset, you can run the following scripts to download SC subjects.I use atom+platformio to develop some software on ESP8266. The following setup has been used to reproduce this work: This figure illustrates one interpretable LSTM cell from the model, which learn to keep track when each subject is awake (i.e., in W stage): Note: Fs is the sampling rate of the input EEG signals ![]() You can also find our accepted version before the publication in arXiv. This work has been accepted for publication in IEEE Transactions on Neural Systems and Rehabilitation Engineering. Ĭode for the model in the paper DeepSleepNet: a Model for Automatic Sleep Stage Scoring based on Raw Single-Channel EEG by Akara Supratak, Hao Dong, Chao Wu, Yike Guo from Data Science Institute, Imperial College London. TinySleepNet: An Efficient Deep Learning Model for Sleep Stage Scoring based on Raw Single-Channel EEG by Akara Supratak and Yike Guo from The Faculty of ICT, Mahidol University and Imperial College London respectively. We have published a more efficient deep learning model, named TinySleepNet, which is much smaller and can achieve a better scoring performance. A deep learning model for automatic sleep stage scoring based on raw, single-channel EEG. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |