Meine Idee für die 8er-Streifen ist ein Termometer zu bauen. Dabei kann man in Zukunpft sogar Anzeigemodi variiren.
Monochrom – einfach steigende und fallend, wie der echte Bruder.
oder Monochrom – steigende und fallend mit farbänderung für alle akive LEDs.
oder Bunt – 1 & 2 blau für -10 bis 0°C , 3 & 4 grün für 0 – 10°C.
Ihr seht es gibt viele Möglichkeiten…
Bild(er)
Arduino Code
#include <Adafruit_NeoPixel.h> #define Pin_Termometer_1 1//pin1 Adafruit_NeoPixel Termometer1 = Adafruit_NeoPixel(8, Pin_Termometer_1, NEO_GRB + NEO_KHZ800); void Thermometer_Innen() { int Temp1 = dht1.readTemperature(); //Innentemperatur auslesen if (Temp1 < -10) { Termometer1.setPixelColor(0, 0, 0, 0); Termometer1.setPixelColor(1, 0, 0, 0); Termometer1.setPixelColor(2, 0, 0, 0); Termometer1.setPixelColor(3, 0, 0, 0); Termometer1.setPixelColor(4, 0, 0, 0); Termometer1.setPixelColor(5, 0, 0, 0); Termometer1.setPixelColor(6, 0, 0, 0); Termometer1.setPixelColor(7, 0, 0, 0); Termometer1.show(); } if (Temp1 >= -10 && Temp1 < -5) { Termometer1.setPixelColor(0, 0, 0, 125); Termometer1.setPixelColor(1, 0, 0, 0); Termometer1.setPixelColor(2, 0, 0, 0); Termometer1.setPixelColor(3, 0, 0, 0); Termometer1.setPixelColor(4, 0, 0, 0); Termometer1.setPixelColor(5, 0, 0, 0); Termometer1.setPixelColor(6, 0, 0, 0); Termometer1.setPixelColor(7, 0, 0, 0); Termometer1.show(); } if (Temp1 >= -5 && Temp1 < 0) { Termometer1.setPixelColor(0, 0, 0, 125); Termometer1.setPixelColor(1, 0, 0, 125); Termometer1.setPixelColor(2, 0, 0, 0); Termometer1.setPixelColor(3, 0, 0, 0); Termometer1.setPixelColor(4, 0, 0, 0); Termometer1.setPixelColor(5, 0, 0, 0); Termometer1.setPixelColor(6, 0, 0, 0); Termometer1.setPixelColor(7, 0, 0, 0); Termometer1.show(); } if (Temp1 >= 0 && Temp1 < 5) { Termometer1.setPixelColor(0, 0, 125, 0); Termometer1.setPixelColor(1, 0, 125, 0); Termometer1.setPixelColor(2, 0, 125, 0); Termometer1.setPixelColor(3, 0, 0, 0); Termometer1.setPixelColor(4, 0, 0, 0); Termometer1.setPixelColor(5, 0, 0, 0); Termometer1.setPixelColor(6, 0, 0, 0); Termometer1.setPixelColor(7, 0, 0, 0); Termometer1.show(); } if (Temp1 >= 5 && Temp1 < 10) { Termometer1.setPixelColor(0, 0, 125, 0); Termometer1.setPixelColor(1, 0, 125, 0); Termometer1.setPixelColor(2, 0, 125, 0); Termometer1.setPixelColor(3, 0, 125, 0); Termometer1.setPixelColor(4, 0, 0, 0); Termometer1.setPixelColor(5, 0, 0, 0); Termometer1.setPixelColor(6, 0, 0, 0); Termometer1.setPixelColor(7, 0, 0, 0); Termometer1.show(); } if (Temp1 >= 10 && Temp1 < 15) { Termometer1.setPixelColor(0, 128, 128, 0); Termometer1.setPixelColor(1, 128, 128, 0); Termometer1.setPixelColor(2, 128, 128, 0); Termometer1.setPixelColor(3, 128, 128, 0); Termometer1.setPixelColor(4, 128, 128, 0); Termometer1.setPixelColor(5, 0, 0, 0); Termometer1.setPixelColor(6, 0, 0, 0); Termometer1.setPixelColor(7, 0, 0, 0); Termometer1.show(); } if (Temp1 >= 15 && Temp1 < 20) { Termometer1.setPixelColor(0, 128, 128, 0); Termometer1.setPixelColor(1, 128, 128, 0); Termometer1.setPixelColor(2, 128, 128, 0); Termometer1.setPixelColor(3, 128, 128, 0); Termometer1.setPixelColor(4, 128, 128, 0); Termometer1.setPixelColor(5, 128, 128, 0); Termometer1.setPixelColor(6, 0, 0, 0); Termometer1.setPixelColor(7, 0, 0, 0); Termometer1.show(); } if (Temp1 >= 20 && Temp1 < 25) { Termometer1.setPixelColor(0, 128, 30, 0); Termometer1.setPixelColor(1, 128, 30, 0); Termometer1.setPixelColor(2, 128, 30, 0); Termometer1.setPixelColor(3, 128, 30, 0); Termometer1.setPixelColor(4, 128, 30, 0); Termometer1.setPixelColor(5, 128, 30, 0); Termometer1.setPixelColor(6, 128, 30, 0); Termometer1.setPixelColor(7, 0, 0, 0); Termometer1.show(); } if (Temp1 >= 25 && Temp1 < 30) { Termometer1.setPixelColor(0, 128, 30, 0); Termometer1.setPixelColor(1, 128, 30, 0); Termometer1.setPixelColor(2, 128, 30, 0); Termometer1.setPixelColor(3, 128, 30, 0); Termometer1.setPixelColor(4, 128, 30, 0); Termometer1.setPixelColor(5, 128, 30, 0); Termometer1.setPixelColor(6, 128, 30, 0); Termometer1.setPixelColor(7, 128, 30, 0); Termometer1.show(); } if (Temp1 >= 30 && Temp1 < 35) { Termometer1.setPixelColor(0, 128, 0, 0); Termometer1.setPixelColor(1, 128, 0, 0); Termometer1.setPixelColor(2, 128, 0, 0); Termometer1.setPixelColor(3, 128, 0, 0); Termometer1.setPixelColor(4, 128, 0, 0); Termometer1.setPixelColor(5, 128, 0, 0); Termometer1.setPixelColor(6, 128, 0, 0); Termometer1.setPixelColor(7, 128, 0, 0); Termometer1.show(); } if (Temp1 >= 35) { Termometer1.setPixelColor(0, 128, 0, 128); Termometer1.setPixelColor(1, 128, 0, 128); Termometer1.setPixelColor(2, 128, 0, 128); Termometer1.setPixelColor(3, 128, 0, 128); Termometer1.setPixelColor(4, 128, 0, 128); Termometer1.setPixelColor(5, 128, 0, 128); Termometer1.setPixelColor(6, 128, 0, 128); Termometer1.setPixelColor(7, 128, 0, 128); Termometer1.show(); } }
Bezugsquellen
Amazon – NeoPixel Stick mit 8 LEDs