Smart House project - few questions

Hello there,

I am quite new in ESP8266 topic.
I need to make some project for my diploma - Smart House. I want to control things like movement sensor, dht, CO2 sensor, camera. I thouht about using RaspberryPI + Arduino/arduinos + ESP8266 + MQTT

After searching in the web I am very confused. I have found tutorials about using ESP8266 (and its GPIO's) but only ESP, without arduino..

So my question is - is this possible?
Does ESP can "control", send data to arduino pins?

mchmielele:
After searching in the web I am very confused. I have found tutorials about using ESP8266 (and its GPIO's) but only ESP, without arduino..

You have found what you need to know. The first thing you need to sort out is why you need all that stuff. Multiple Arduinos is probably the last thing you need. You may not need any, and you may find that a single Node MCU ESP8266 or ESP32 can do it all. A likely approach is to have a central ESP32 with a WiFi network of minimal ESP8266s, each connected to a sensor, thereby saving on wiring, but still needing you to address the power supply.

The main reason is I already have few arduinos and few ESP8266, and since Arduino has more pins I thought that this will be better solution. Now I'm considering your option and I see that both ESP32 and NodeMCU have more pins and it looks interesting.

You certainly can hook up an Arduino and a ESP, just use the Serial pins... rx to tx and vice versa. Make sure both begin Serial with same baud rate. The ESP 32 has plenty of pins by the way.

Think of the NodeMCU as a fast Arduino on it's own. No real need for another Arduino it will program from the IDE just fine and act like an Arduino.

Downsides, 3.3volt, only one analog pin

There are plenty of examples on the net.

Look up the board download for it to appear in your boards and library.

I have ordered ESP32, tkanks for replies. Could you guys explain me one more thing?

As far as I understand:
ESP8266 is not so easy to control (AT commands) so some wise guys created NodeMCU as a hardware and as a software which can be uploaded on top of the ESP chip and we can use more easiers ways to program it, but also when I was researching about esp32 - there is possibility to only connect it to PC, use Arduino IDE, connect repos, choose esp32 board, choose libraries and program IT normally from arduino IDE. So, im that case, what is the NodeMCU role?

I understand the ESP32 is essentially a successor to the Node-MCU. The Heltec WiFi Kit32 has more pins and incorprates an OLED display. Both it and Node-MCU can cooperate with an Arduino but they are both 3.3v devices and are not tolerant of 5v on any pins.

If you have any WiFi operations, both are worthy as Arduino replacements. They are cheaper, faster, have more memory, and I imagine the need for either to work in conjunction with Arduino would be quite rare - hence my comment. If there really was a need, like with a Mega and its plethora of pins, you would probably use one of those $2 ESP8266s instead, and treat it as a peripherial.

In simple terms NodeMCU is ESP8266 hardware & firmware designed to program and use it using the Lua programming (scripting) language. You don't need to use the Lua language though and you have other options

You can also get a version of micro python (another scripting language) installed so you can write code in python if you prefer.

An ESP8288 can also run firmware to interact with an MCU (like arduino) using a variant of AT commands. This makes the ESP a dumb wireless modem to rx/tx data over wi-fi.

The cherry on top though is you can use a specially written firmware that allows you to program and use the ESP8266 like an arduino in C++ but still maintain the wifi side of the chip (if you need it) so no need of an Arduino & and ESP combined.