I am using an Arduino mega and a Sim 7000a modem, I am trying to send commands from adafruit io using MQTT while running other code from the Arduino, so for testing I am just running a counter that counts up to 1000 and resets and I want to be able to send commands to the modem to do stuff without it delaying my counter or stopping it. The problem I'm having is that whenever I send a command from adafruit io it halts my program that is already running and delays it and for the application I'll be using it for I cannot have the program halt at any time.I have been looking into the Adafruit_MQTT.h and cpp libraries used as I thought that would be the root of all my problems, I also tried removing any delays in the libraries as I thought it would help,but it only made it worse. Below I would attach my code, and both libraries I think could be causing the problem.
It could also be the serial buffer, please I need help solving this urgently
Hi Perhaps you need multi task mechanism in order to do that, or not using adafruit library in the first place. I'd love to help you to do that
Bu iş için 5 freelancer ortalamada $55 teklif veriyor
Hello, I'am experienced in, Digital / Analog Electronics ESP32 , ESP8266 , Arduino, PIC , AVR , ARM , STM32 , 8051 Programming Single board computers ( Raspbery pi,Orange pi etc) C , C++ , Java , Python , C# PCB desig Daha Fazla