// Forum: https://forum.arduino.cc/t/tinkercad-arduino-simulation-freezes-prints-y-in-monitor/1293745
// This Wokwi project: https://wokwi.com/projects/406789028048604161
// Count the leds:
// 2 * (10 + 16 + 10 + 10 + 20 + 80) = 292
#include <Adafruit_NeoPixel.h>
#define NUM_LEDS 292
#define LED_PIN 2
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, LED_PIN, NEO_GRB + NEO_KHZ800);
void setup()
{
Serial.begin(115200);
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
strip.begin();
strip.show();
strip.clear();
}
void loop()
{
for(int i=0; i<NUM_LEDS; i++)
{
strip.setPixelColor(i, strip.Color(255,0,0));
strip.show();
delay(10);
}
delay(500);
strip.clear();
strip.show();
for(int i=0; i<5; i++)
{
digitalWrite(13,HIGH);
digitalWrite(12,HIGH);
digitalWrite(11,HIGH);
delay(500);
digitalWrite(13,LOW);
digitalWrite(12,LOW);
digitalWrite(11,LOW);
delay(500);
}
}
to ledstrip