Cloud M2M with IFTTT
In the previous recipe, we saw a good example of how to make two Arduino boards talk within your own local Wi-Fi network. However, it was not convenient, for example, you had to enter the IP address of one device in the sketch of the other device.
In this recipe, we are going to use IFTTT again (that we already used in the previous chapter) to make the devices talk, but this time via the Internet. We'll see that it greatly simplifies everything, and that it, of course, allows the devices to be anywhere in the world.
Getting ready
First, make sure that you have two boards assembled just as in the previous recipe. You will also need an account at IFTTT, with the Maker channel connected.
You will also need to install the PubSubClient
library that you can find inside the Arduino library manager.
I'll now show you what you need to modify on each board to make the boards talk via IFTTT. Of course, you will find the complete code inside the GitHub repository of this book.
In this...