First of all, apologies, because I think this is not the issue of the PubSubClient, but I cannot find a better place to ask my question.
I have an Arduino Due with W5500 Ethernet shield.
I would like to control a little servo motor to be able to open my grill's airflow vent, so I would like to use the Servo library.
I have an OpenHAB system inside of my home, I run several Arduino and ESP devices with PubSubClient, PubSubClient is the heart of my automation, the communication is happening via MQTT.
Unfortunately, my last project is not working, the MQTT server drops the connection after several seconds with my new Arduino Due.
I made a lot of tests and realized if I set up the Servo.h in the Setup section (Servo1.attach(SERVOPin);) the MQTT client is not working anymore. If I uncomment it, the connection is great again, there is no issue, moreover, there is a problem with serial communication as well if I include Servo.h . I'm not a big coder guy, I looked into Servo.h and I realized it might cause some interrupt or timing issue which conflicts with PubSubClient (and Serial).
Do you have any experience like this?
I found another project where MQTT and Servo were working together fine...
Much appreciated your ideas and help.
Kindest Regards,
Gergely
PS.: Servo version is 1.1.8 by Arduino, PubSubClient is 2.8.0
Dear All,
First of all, apologies, because I think this is not the issue of the PubSubClient, but I cannot find a better place to ask my question. I have an Arduino Due with W5500 Ethernet shield.
I would like to control a little servo motor to be able to open my grill's airflow vent, so I would like to use the Servo library. I have an OpenHAB system inside of my home, I run several Arduino and ESP devices with PubSubClient, PubSubClient is the heart of my automation, the communication is happening via MQTT.
Unfortunately, my last project is not working, the MQTT server drops the connection after several seconds with my new Arduino Due. I made a lot of tests and realized if I set up the Servo.h in the Setup section (Servo1.attach(SERVOPin);) the MQTT client is not working anymore. If I uncomment it, the connection is great again, there is no issue, moreover, there is a problem with serial communication as well if I include Servo.h . I'm not a big coder guy, I looked into Servo.h and I realized it might cause some interrupt or timing issue which conflicts with PubSubClient (and Serial).
Do you have any experience like this? I found another project where MQTT and Servo were working together fine...
Much appreciated your ideas and help.
Kindest Regards, Gergely
PS.: Servo version is 1.1.8 by Arduino, PubSubClient is 2.8.0