Raspberry - Arduino MQTT communication

58 views
Skip to first unread message

Aissam OUTCHAKOUCHT

unread,
Jul 12, 2016, 1:29:11 PM7/12/16
to MQTT
Hello everyone,

I'm using an IoT architecture with raspberry pi and two arduinos communicating to each other and with Thingspeak IoT platform. Communication is over HTTP.

Now I want to switch from HTTP to MQTT but I don't know how, so I have a question :
How can I use the raspberry pi as MQTT server that receives and stores Arduinos' data.

thanks a lot guys

Librae L

unread,
Jul 12, 2016, 1:38:49 PM7/12/16
to mq...@googlegroups.com, MQTT
Hi, outissam92, 

Do you have a WiFi module or an ethernet shield?
You'll need to setup the module to support MQTT and connect to broker.
Or you can take this as a reference:
This is a project I started in order to make it simple for devices like arduino to communicate with each other.

Thanks,
Librae
--
To learn more about MQTT please visit http://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
To post to this group, send email to mq...@googlegroups.com.
Visit this group at https://groups.google.com/group/mqtt.
For more options, visit https://groups.google.com/d/optout.

Dougie Lawson

unread,
Jul 12, 2016, 4:45:13 PM7/12/16
to mq...@googlegroups.com

On 12 July 2016 at 18:29, Aissam OUTCHAKOUCHT <outis...@gmail.com> wrote:

Now I want to switch from HTTP to MQTT but I don't know how, so I have a question :
How can I use the raspberry pi as MQTT server that receives and stores Arduinos' data.


It's trivial to install Mosquitto on a RPi running Raspbian. 
All fourteen of my Raspberries are running that.


Arduinos are easy to connect to RPis, just plug the USB cable from your Arduino into one of the four sockets on your RPi and /dev/ttyAMA0 or /dev/ttyUSB0 just appears. Reading/writing serial data isn't difficult even in the world's worst programming language (python).


There's even an Arduino IDE that can be installed on Raspbian.

Reply all
Reply to author
Forward
0 new messages