Arduino Nano and phone communication through internet on very long distances

Hello
Is there a way to make and Arduino nano connect to the internet and retrieve and send data to a real time database?
I wanted to create a device that turns on the heating in my house whenever I want and wherever I am, but I never worked with the internet connected to Arduino.
Is there a way or a device to do this?
(I already have an ESP8266 Esp-01)
Do you have any suggestions?

You seem to be talking about Internet of Things, which is a service provided by others that you may join. This does not necessarily involve a phone. Some services offer two way traffic.

Blynk

Thingspeak

If you have an ESP-01 you already have the required device. No need for an Arduino at all, Nano or otherwise.

Point is, it is easier to program the ESP8266 to perform the complete task, than to have it communicate with an Arduino. It has four I/O pins available, enough to either connect to four lines, or various I2C (or SPI) peripherals.

And how can I program the ESP then? And how do I have to power it etc?

Firstly, when you mention powering the ESP-01, I do hope you did not imagine using the 3.3 V pin of the Nano to do it! :astonished:

These adaptors are really useful to use with the ESP-01, this version has the programming selector switch built in so you do not have to add a jumper to the cheaper version (half the price!).

They plug directly into a USB "phone charger" to operate as your final product and you can simply solder your control wires to the three available I/O pins (the RX pin connects to the USB chip and would need a board modification to make that available as a fourth I/O).

Alternatively if you are wanting to switch a single heating control, you could use a relay board with the ESP-01.

Like the USB module, this also has a dedicated 3.3 V regulator to provide the 3.3 V from a 5 V supply and you would again solder the connections from your temperature sensor to the relay module.

Logically, you would buy both modules (cheap but slow from China) and swap the ESP-01 between the programming module and the relay board to program and test.

And if you are ordering things, go buy a couple more ESP-01S. :grinning:

Paul__B:
Alternatively if you are wanting to switch a single heating control, you could use a relay board with the ESP-01.

Just today I was looking at some of those modules - it's hard to find but there exist modules that have TX and RX broken out, allowing you to connect some sensor there, making it even more useful. In my case that's going to be an ultrasound distance sensor.

Logically, you would buy both modules (cheap but slow from China)

That depends a bit on where you live, but indeed my latest shipment of stuff from China is rather slow. Ordered the warehouse to ship last Friday, it's STILL not arrived. I hoped yesterday (quite often they manage next day, especially if the order is no later than mid afternoon), expected today, but no... Probably tomorrow then...

Quite frankly, I cannot fathom this.

Surely it is not shipped by sea!

My suspicion is that the hiatus is the incoming mail system. And I surmise that this is a deliberate response to the gross imbalance in mail flow whereby mail (packages) from China grossly outnumber mail to China (except perhaps for infant formula!), so as they are not getting paid for delivery, the incoming mail service processes it in the slowest way possible, a week or two (or three)in most cases.

Or is it (container) sea freight?

Paul__B:
Quite frankly, I cannot fathom this.

Surely it is not shipped by sea!

No... that wouldn't make much sense... I suppose it's by truck.

The SF warehouse where parcels are consolidated is in Shenzhen; the border is 20 mins by train from where I live.

Then how can I program it and solder something to it? And how can I access the IoT with that?

Everything you need to know to get started with the ESP8266 processor.

nicolopadovandev:
Then how can I program it and solder something to it? And how can I access the IoT with that?

Well, there's the question! :astonished:

To program it you use the Arduino IDE and you need to understand how to program. :sunglasses:

To solder you need to have some skill in soldering. You mention constructing something to control house heating. I consider it reasonable to say that you need to be able to solder to do any significant work with electronics.

And IoT with the ESP8266 is just programming with Internet and Web systems. You just need to be able to do it (but there are lots of examples floating around). An ESP8266 is just as good for learning programming, as an Arduino, and you use a common IDE.

You have a long road to travel. Start with the most basic setup, learn to blink an LED and go from there.

The LED on the ESP or an LED far away?

Start with the LED on the ESP.

Then an LED that's wired to it.

Then a bunch of other projects, to step by step understand how to connect to the Internet and so.

Then an LED that's "far away" (could be the other side of your desk) - controlled via Internet, meaning physical distance is irrelevant.

Could you please link me docs for that? I can't find anything...

There's the examples in the IDE, and then there's this. That should get you started.

wvmarle:
my latest shipment of stuff from China is rather slow. Ordered the warehouse to ship last Friday, it's STILL not arrived.

Sometimes China has a big holiday. Never order close to or during Chinese New Year, that's worth 3 extra weeks.

Would an Ethernet module be an alternative?

GoForSmoke:
Would an Ethernet module be an alternative?

Already has the ESP8266.

Why not Ethernet? Well, if it is for your business or otherwise mission critical, then Ethernet is the only way to go but otherwise, Ethernet requires an Ethernet stack module, a substantial length of wire and a port on one of your network switches. Quite a substantial amount of "stuff".

The tiny ESP8266 is however, unencumbered as long as you have a WiFi access point; you can use many of them, no cords, no additional hardware.