#include <Adafruit_NeoPixel.h>
#define DATA_PIN 13
#define LED_COUNT 128
#define COLOR_ORDER GRB
#define LED_TYPE NEO_GRB
Adafruit_NeoPixel strip(LED_COUNT, DATA_PIN, NEO_GRB + NEO_KHZ800);
void seinkanan() {
const uint64_t IMAGES[] = {
0x10307efe7e301000,
0x2060fcfdfc602000,
0x40c0f9fbf9c04000,
0x8081f3f7f3818000,
0x0103e7efe7030100,
0x0206cfdfcf060200,
0x040c9fbf9f0c0400,
0x08183f7f3f180800
};
const int IMAGES_LEN = sizeof(IMAGES) / 8;
strip.begin();
strip.show();
int brightness = 225; // Adjust this value to set the initial brightness
while (true) {
strip.setBrightness(brightness);
for (int j = 0; j < IMAGES_LEN; j++) {
for (int k = 0; k < 2; k++) {
int startPixel = k * 64;
for (int i = 0; i < 64; i++) {
int pixelIndex = startPixel + i;
if (IMAGES[j] & (1ULL << (63 - i))) {
strip.setPixelColor(pixelIndex, strip.Color(220, 83, 0));
} else {
strip.setPixelColor(pixelIndex, strip.Color(0, 0, 0));
}
}
}
strip.show();
delay(75);
}
// Optionally, you can add code here to adjust brightness over time or based on external factors
// For example, you can use analogRead to read a potentiometer value and map it to brightness.
// brightness = map(analogRead(A0), 0, 1023, 0, 255);
// delay(100); // Add a delay if needed to prevent rapid changes
}
}
void setup() {
seinkanan();
}
void loop() {
// Tidak perlu menambahkan logika di sini, karena semua logika animasi berada dalam fungsi seinkanan()
}
FPS: 0
Power: 0.00W
Power: 0.00W