This is where I am at with the code,
I am a bit of a beginner with programming and trying to learn what I can.
I used the base Cloud code, added a standard fastLED setup, and added the description in the widget database in the end statement.
uint8_t r, g, b;2rgbVariable.getValue().getRGB(r, g, b);
/*
Sketch generated by the Arduino IoT Cloud Thing "Untitled"
https://create.arduino.cc/cloud/things/390eae0f-abc1-4600-8a04-3dc4b0c1274e
Arduino IoT Cloud Variables description
The following variables are automatically generated and updated when changes are made to the Thing
CloudColoredLight lEDstrip;
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"
// FastLED NeoPixel - Version: Latest
#include <FastLED.h>
#define NUM_LEDS 5
#define LED_PIN 6 // Replace 6 with your actual pin number
CRGB leds[NUM_LEDS];
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);
FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, NUM_LEDS);
// Defined in thingProperties.h
initProperties();
// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
/*
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
*/
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
}
void loop() {
ArduinoCloud.update();
// Your code here
}
/*
Since LEDstrip is READ_WRITE variable, onLEDstripChange() is
executed every time a new value is received from IoT Cloud.
*/
void onLEDstripChange() {
// Add your code here to act upon LEDstrip change
uint8_t r, g, b;
lEDstrip.getValue().getRGB(r, g, b);
}