What ideal network protocol to communicate an Application with Arduino?

1

I've done creating an app through Android Studio. I have an Arduino Mega, Shild Ethernet and infrared sensors.

I would like to communicate my arduino with my application over the internet.

Ex: I was traveling, when the infrared sensor triggers, I get alerted in my application.

I've seen a lot of tutorials, but only with intranet networking. Just remembering, my internet contemplates the IPV6 system.

    
asked by anonymous 13.08.2016 / 00:47

1 answer

1

You can use the mqtt standard, it was developed exactly to be super lightweight and used in sensor and signal capture.

Using the link service your arduino does a http post in style

http://data.sparkfun.com/input/sua-chave&nomeCampo=valor

The sparkfun records the results, with date and time, generates graphs and you can program your android app to consult this data available on the site.

In this way you will not be communicating directly arduino - celular, but avoid having to open ports on your router to expose your arduino, local network and also the need to follow the changes of your public ip your router) which is usually not fixed.

    
03.10.2016 / 16:34