#include "Cloud_PLC.h" //Include the header file for Cloud_PLC library
void setup()
{
Serial.begin(115200); //Initialize serial communication at 115200 baud rate
Cloud_PLC_initialisation(); //Call the initialization function for Cloud_PLC
}
void loop()
{ // Check the digital input state of IN1
if (Cloud_PLC_Digital_Read(IN1) == HIGH) //input channel, IN1,IN2,IN3,IN4,IN4
 {
Serial.println("HIGH"); // Print "ON" to the Serial Monitor if IN1 is HIGH
delay(2000);
}
else
 {
Serial.println("LOW"); // Print "OFF" to the Serial Monitor if IN1 is not 
delay(2000); // Wait for 2000 milliseconds (2 seconds)
}
}