Chat here is you are connecting ESP-xx type modules to existing AVR based Arduino

Moderator: igrr

User avatar
By Josh Blease
#48768 I have a very physically small project of mine containing an arduino pro mini connected to a few LEDs and a rotary encoder. I am looking to send the value of the rotary encoder to an MQTT broker using the ESP8266 as a "wifi adapter".

I have come across the Espduino library but I am having no luck with it at all and if preferable I would like to keep the pro mini's serial port free (for future programming and other bits). I have however been able to mimic the SparkFun WiFi shield but that's not working well with the PubSubClient library at all.

Is there a library or any tutorial to point me in another, preferably working, direction. I cannot remove the pro mini as the ESP lacks enough I/Os. I did look into I2C but with that the ESP cannot be a slave which is what I would want.
User avatar
By awwende
#48780 I've been using pubsubclient with the ESP. Why can't you just send the information over UART to the ESP and publish the data using client.publish(TOPIC,data). The annoying thing with the new pubsubclient library is that the message cannot be a string, but has to be a char array.