Close

Early lessons

A project log for SentriFarm

Solving a key farming problem: is it safe to harvest / spray / sow today? (+experiments with 'big' data in agriculture)

pastcomputepastcompute 03/16/2015 at 12:470 Comments

The digispark only has 8kb of flash, of which 6kb is available to sketch code. I should have realised, but it turns out I could only just fit serial debugging, DHT-11 and turning on the ESP8266 in AP mode. This might still be fine for a sensor with serial debugging disabled, but I also struck various electrical issues.

For 7 times out of 10 after flashing, even making sure I isolated the digispark to flash and then reset everything, I noticed that even though I could see the LED indicating the esp8266 was receiving the commands, the SSID was not showing up on my wifi scanner. When I enabled serial debug the code reported no response bytes received from the esp8266 when that happened. I think it is a reset order / powering up problem or even some kind of ground looping issue, perhaps the pins in the digispark send junk down the serial line. I noticed for example that if I left the digispark tx pin connected to the esp, flashing would fail.

To dig deeper I might have to drag out my storage cro and see whats happening, and/or put a jumbo sleep at boot so I can turn on the esp8266 manually after the digispark boots, with time to space.

But what all this really means, apart from being a learning exercise, is perhaps I need to consider some other processor even for the sensor. Perhaps its time to dive direct into bare metal code on the esp8266...

Options:

First though I'll try and control the ESP reset from the digispark, and I'll probably spend a little more time cleaning up my wiring and checking the various lines are properly pulled up, power isolated and buffered and enough current supplied, etc. before deciding what to do. Maybe it is just something like a capacitor is needed or a common supply.

I don't want to waste too much time on this basic stuff, my available time will be limited as I have other things to do...

Discussions