Hi
I just need to trigger Alexa routine with my nano IoT software. I tried Alexa trigger a Led on my nano and i'ts work. See my code:
/*
Sketch generated by the Arduino IoT Cloud Thing "Cloud Blink"
Arduino IoT Cloud Variables description
The following variables are automatically generated and updated when changes are made to the Thing
CloudLight led;
CloudSwitch interrupteur1;
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.
*/
bool pushsw = false;
#include "thingProperties.h"
void setup() {
// Initialize serial and wait for port to open:
Serial.begin(9600);
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
delay(1500);
// Defined in thingProperties.h
initProperties();
// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
pinMode(LED_BUILTIN, OUTPUT);
pinMode(7, INPUT);
pinMode(8, OUTPUT);
}
void loop() {
ArduinoCloud.update();
pushsw = digitalRead(7);
interrupteur1 = pushsw;
digitalWrite(LED_BUILTIN, pushsw);
digitalWrite(8, pushsw);
Serial.println(pushsw);
delay(100);
}