Dear Sir
i cannot update Status of LED on Arduino cloud after press switch.
Could you please help me to edit code?
</ '''
CloudLight green;
bool blue;
Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
which are called when their values are changed from the Dashboard.
These functions are generated with the Thing and added at the end of this sketch.
*/
#include "thingProperties.h"
#include <TridentTD_LineNotify.h>
#define SSID "xxxxxx"
#define PW "xxxxx"
#define Token "xxxxxxx"
void setup() {
Serial.begin(9600);
WiFi.begin(SSID,PW);
pinMode(2,OUTPUT);
digitalWrite(2,LOW);
while (WiFi.status() != WL_CONNECTED) {
delay(100); }
digitalWrite(2,HIGH);
LINE.setToken(Token);
pinMode(22,INPUT_PULLUP);
pinMode(23,OUTPUT);
pinMode(16,INPUT_PULLUP);
pinMode(17,OUTPUT);
delay(1500);
initProperties();
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
}
void loop() {ArduinoCloud.update();}
void onBlueChange() {
if(digitalRead(22) ==HIGH)
{ digitalWrite(23,HIGH);}
else {digitalWrite(23,LOW);}
}
void onGreenChange() {
if(digitalRead(16) ==HIGH)
{digitalWrite(17,HIGH);}
else {digitalWrite(17,LOW);}
}
''' />
