Arduino-Raspberry-Mosquitto Connecting arduino with mosquittoMQTT deployed on Raspberry Pi Have a look here on how to setup the environment.