Using NodeMCU 1.0 (ESP8266) get error messages below
Code is running in loop but not connecting to the Arduino Cloud
***** Arduino IoT Cloud - configuration info *****
Device ID: 6ff8ab25-92ae-4900-a765-2a686223607e
MQTT Broker: iot.arduino.cc:8884
WiFi.status(): 3
Connected to "xTimeCapsule"
TimeServiceClass::sync Drift: -1719255795 RTC value: 1719255803
ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to iot.arduino.cc:8884 Error: 5
interval start
ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to iot.arduino.cc:8884 Error: 5
ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to iot.arduino.cc:8884 Error: 5
interval start
It is confusing when code is verified and uploaded successfully and executes (partially) using the cloud editor. There are no warnings or alerts.
Another issue I have found is that in IDE 2.3.2 for NodeMCU 1.0 (ESP8266) devices ICACHE_RAM_ATTR is deprecated and that IRAM_ATTR is the upgrade recommended but in the Arduino Cloud only the ICACHE_RAM_ATTR is verifiable. Used for interrupts.
void ICACHE_RAM_ATTR ISR_count() //deprecated
void IRAM_ATTR ISR_count() //IRAM faster than FLASH
The IRAM_ATTR macro was added, and the ICACHE_RAM_ATTR macro deprecated in version 3.0.0 of the "esp8266" boards platform:
The reason you can use the IRAM_ATTR macro and see a deprecation warning for uses ICACHE_RAM_ATTR when compiling sketches with Arduino IDE 2.3.2 is that you have version 3.0.0 or newer of the "esp8266" boards platform installed on your computer.
Version 2.5.0 of the "esp8266" boards platform is installed on the Arduino Cloud server, so you only have access to the API provided by that version of the platform when compiling Arduino sketches in Cloud Editor.