Arduino IoT Cloud blinking LED question

Hi, I am following the IoT Cloud guide - getting started and wants to create the blinking LED project.
I believe I have done everything mostly correct, but the LED is not turning on and off as expected.
Any help would be appreciated, thank you.

Here is my code:

  Sketch generated by the Arduino IoT Cloud Thing "Untitled"

  Arduino IoT Cloud Variables description

  The following variables are automatically generated and updated when changes are made to the Thing

  bool button;

  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"

#define LED_PIN 13;

void setup() {
  // Initialize serial and wait for port to open:
  // This delay gives the chance to wait for a Serial Monitor without blocking if none is found

  // Defined in thingProperties.h

  // Connect to Arduino IoT Cloud

     The following function allows you to obtain more information
     related to the state of network and IoT Cloud connection and errors
     the higher number the more granular information you’ll get.
     The default is 0 (only errors).
     Maximum is 4

void loop() {
  // Your code here
  if (button){
    // Do something
    digitalWrite(LED_BUILTIN, HIGH);   
    digitalWrite(LED_BUILTIN, LOW);    

void onButtonChange() {
  Serial.println("a change has occured");

and here is a picture of my switch, the status is just to show that it is linked to the variable correctly:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.