The use of the ESP8266 in the world of IoT

User avatar
By bepitulaz
#26853 Hi,

I'm a newbie in embedded programming and electronic. Currently I'm building a prototype for IoT hydroponic farm. My requirements are:

1. Switching the growing lamp ON/OFF at the correct time, and also can be switched manually over the internet.
2. Switching the fan speed based on the temperature.
3. Send the temperature and the humidity log to the server, but when the internet offline it will save the log in SD Card, and send to the server later when the internet is up again.

I'm considering two options for that, but I don't know which are the best and the easiest to program. Don't worry I know about C and how to code custom firmware using ESP SDK.

The first is:
ESP-01 + Arduino Pro Mini + DHT22 + Relay Module + SD Card Module

The second is:
ESP-07/08 + DHT22 + Relay Module + SD Card Module

I never develop an embedded system that use SD Card Module before. Is this SD Card module suitable for this project? https://www.bukalapak.com/p/elektronik/lain-lain-208/844qm-jual-cnc-promo-sd-card-read-write-slot-module-for-arduino-uno-mega-mini-nano (I'm searching from local online store in my country).

I also never use ESP-07 or ESP-08. If I choose to use it, can it works without arduino? I think the numbers of its GPIO will be enough for that kind of project. Any tutorial for reading and writing to SD Card from ESP-07/08?

Thanks for your advice :)
User avatar
By martinayotte
#26873 I suggest your Option#2.

For the SDCard, the one you mentioned is exactly the one I've used on my ESP12. (see viewtopic.php?f=32&t=3558&hilit=SDCard&start=35#p21274)
It is working fine with both SD or SdFat libraries. But I prefer the SdFat, it is more rock solid and still maintain.
User avatar
By lethe
#27292 If you are using the ESP without external uC, I don't really see the need for a SD card in your project. You can just as well log your data to the ESPs flash. Even if you have only a single flash sector (4KB) to spare, you would be able to fit 256 log entries (assuming up to 4 ints/floats per entry). That should be more than enough to compensate for a dodgy internet connection.