#include #define PIN 3 // Pin to NeoPixels (PB3 in ATtiny45) #define NUMPIXELS 9 // Number of NeoPixels #define BRIGHTNESS 10 // Brightness of the neopixel #define BUTTON_PIN 4 // Pin conect to button (PB4 in ATtiny45) Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); void setup() { pixels.begin(); // Start to neopixeles pinMode(BUTTON_PIN, INPUT_PULLUP); // Set button pin as input with internal pull-up resistor } void loop() { if (digitalRead (BUTTON_PIN) == HIGH) { // Check if button is pressed // Define the color to each type of personality of eneagram uint32_t color1 = pixels.Color(255, 0, 0); // Red uint32_t color2 = pixels.Color(0, 255, 0); // Green uint32_t color3 = pixels.Color(0, 0, 255); // Blue uint32_t color4 = pixels.Color(255, 255, 0); // Yellow uint32_t color5 = pixels.Color(255, 0, 255); // Magenta uint32_t color6 = pixels.Color(0, 255, 255); // Cian uint32_t color7 = pixels.Color(255, 165, 0); // Orange uint32_t color8 = pixels.Color(128, 0, 128); // Purple uint32_t color9 = pixels.Color(255, 255, 255);// White // Turn on each neopixel in order of eneagram pixels.setPixelColor(0, color1); // Type 1 pixels.setBrightness(10); pixels.show(); // Show the colors of neopixeles delay(1000); // Wait 1 second before to turn off the neopixel pixels.clear(); pixels.setPixelColor(7, color2); // Type 2 pixels.setBrightness(10); pixels.show(); // Show the colors of neopixeles delay(1000); // Wait 1 second before to turn off the neopixel pixels.clear(); pixels.setPixelColor(1, color3); // Type 3 pixels.setBrightness(10); pixels.show(); // Show the colors of neopixeles delay(1000); // Wait 1 second before to turn off the neopixel pixels.clear(); pixels.setPixelColor(4, color4); // Type 4 pixels.setBrightness(10); pixels.show(); // Show the colors of neopixeles delay(1000); // Wait 1 second before to turn off the neopixel pixels.clear(); pixels.setPixelColor(6, color5); // Type 5 pixels.setBrightness(10); pixels.show(); // Show the colors of neopixeles delay(1000); // Wait 1 second before to turn off the neopixel pixels.clear(); pixels.setPixelColor(3, color6); // Type 7 pixels.setBrightness(10); pixels.show(); // Show the colors of neopixeles delay(1000); // Wait 1 second before to turn off the neopixel pixels.clear(); pixels.setPixelColor(0, color1); // Type 8 pixels.setBrightness(10); pixels.show(); // Show the colors of neopixeles delay(1000); // Wait 1 second before to turn off the neopixel pixels.clear(); pixels.setPixelColor(2, color7); // Type 9 pixels.setBrightness(10); pixels.show(); // Show the colors of neopixeles delay(1000); // Wait 1 second before to turn off the neopixel pixels.clear(); pixels.setPixelColor(8, color8); // Type 9 pixels.setBrightness(10); pixels.show(); // Show the colors of neopixeles delay(1000); // Wait 1 second before to turn off the neopixel pixels.clear(); pixels.setPixelColor(5, color9); // Type 9 pixels.setBrightness(10); pixels.show(); // Show the colors of neopixeles delay(1000); // Wait 1 second before to turn off the neopixel pixels.clear(); pixels.show(); delay(1000); // Wait 1 second before to turn on again the next cicle // Turn on each neopixel at the same time pixels.setPixelColor(0, color1); pixels.setPixelColor(1, color2); pixels.setPixelColor(2, color3); pixels.setPixelColor(3, color4); pixels.setPixelColor(4, color5); pixels.setPixelColor(5, color6); pixels.setPixelColor(6, color7); pixels.setPixelColor(7, color8); pixels.setPixelColor(8, color9); pixels.setBrightness(10); pixels.show(); // Show the colors of neopixeles delay(1000); // Wait 1 second before to turn off the neopixeles // Turn off the neopixeles pixels.clear(); pixels.show(); delay(1000); // Wait 1 second before to turn on again the next cicle } }