Sounds interesting. Would be cool to see some graphs of height over time.
The ESP deep sleep Stuff looks easy enough, you just call ESP.deepSleep(time) (or something like that). The only problem is waking the thing up again, you need to connect one of the GPIO pins (15 or 16) to the reset line or it never wakes up. Annoyingly it isnt broken out on the esp-01s. But I think with some suitably delicate soldering you can get a jumper wire directly on the chip (I've not tried!).
I think I read that when it wakes up, its just like its booting for the first time, so setup() runs followed by whatever else you have. Although there is some value you can check to find the "boot reason" that tells you if its a cold boot or boot from sleep, etc.
Would be interested to hear success (or otherwise) of getting the deep sleep to work.
--
You received this message because you are subscribed to the Google Groups "swindon-hackspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swindon-hacksp...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hmm, yeah, external eeprom or SD card required maybe. The latest ESP Arduino code has some kind of flash filesystem support, where you get to steal some of the program memory, but you only get 64k or so.
Lightsleep? You can pass parameters for different modes to the deepSleep call. I'm guessing that any sleep turns off WiFi, since the point of sleep is to save power and that's the only thing that's really using power.
I think I read that it reconnects on startup and its supposed to be pretty quick. I suspect if you are sending results every second it might not be that quick or sufficiently beneficial. I think the idea is you are sending readings every 5 or 30s and it takes about 1s to wake up and connect and send the reading. So shutting down for the other 4 or 29s counts as a considerable saving. The link I read was a guy who's done this and had one running for a year or so on a single set of AAs I think.
Those batteries I had on logobot scribbler are about 650mah and I flattened two and maybe a half on Saturday, buts that's with driving motors and servo as well. So probably with some 2000mah AAs you might not need to worry too much.
On 25 August 2015 13:00:43 Damian Axford <dam...@axford.me.uk> wrote:
yeah - graphs could be fun... not sure how many samples I can pack in the RAM of the ESP :)I found that deepSleep stuff.... problem is, I only want a light sleep. Datasheet seems to suggest this is doable, but haven't found the relevant routines to actually do it - nor the implications on wifi connectivity.
--
Ah, okay, interesting. I'd not done any digging. I don't fancy the soldering challenge either really!
A few links I've just read imply that modem_sleep is the default in station mode (what the kits will be) So you're probably already getting it.
Couldn't you :
boot up, WiFi off.
Collect some readings.
Turn on WiFi, send readings.
Reset()
GOTO 1
I suspect you would struggle to generate enough power with wind, though I do want to look into big 3d printed wind turbines for charging 12v batteries. Probably better to just carry more batteries!
External ram chip? Google Arduino spi ram :-) £1.20 for 32k from hobbytronics. If you were clever you could probably keep data in external ram while resetting the ESP...
--
Yeah, I guess so long as they last for the length of the flight, just get some rechargeable, freshly charged set each flight, job done.
On 25 August 2015 14:00:30 Damian Axford <dam...@axford.me.uk> wrote:
unfortunately you seem to need to reset to turn the wifi on and/or off... the external SRAM or an I2C EEPROM would work fine, but requires another chip :(might just leave as is for.... will just use up a lot of batteries
Neat. Have you done anything specific wrt to reconnecting it WiFi if the connection is lost, or is that just out of the box functionality?
--