// NeoPixel Ring simple sketch (c) 2013 Shae Erisson // released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library // CircularBuffer by rlogiacco // Author: Kati Pitkänen 5.6.2018 // Fab Academy 2018 Final Project: Temperature graph screen lit up using NeoPixels #include #include #ifdef __AVR__ #include #include #include #endif #define txPin A1 // A1 transmits signal from the Bridge board #define rxPin A2 // A2 recieves signal from the NODE boards #define numberLEDs 150 // Number of NeoPixels attached to the atMEGA328 #define neopPin 17 // The pin on the atMEGA328 connected to the NeoPixels for sending signals #define RED15 255,45,0 // if the temperature is greater or equal than 30 degrees C switch ON NeoP 149 as RED #define REDORANGE14 255,90,0 // if the temperature is greater or equal than 29 but less than 30 degrees C switch on NeoP 130 as RED ORANGE #define ORANGE13 255,125,180 // if the temperature is greater or equal than 28 but less than 29 degrees C switch on NeoP 129 as ORANGE #define ORANGEYELLOW12 255,200,0 // if the temperature is greater or equal than 27 but less than 28 degrees C switch on NeoP 110 as ORANGE YELLOW #define YELLOW11 255,245,0 // if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW #define YELLOWGREEN10 200,255,0 // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as YELLOW GREEN #define GREEN9 0,255,0 // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as GREEN #define LIGHTGREEN8 0,255,200 // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as LIGHT GREEN #define WHITE7 255,255,255 // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE #define ICEBLUE6 0,255,255 // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as ICE BLUE #define LIGHTBLUE5 0,225,255 // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE #define MIDBLUE4 0,125,255 // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as MID BLUE #define BLUE3 0,25,255 // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE #define PURPLEBLUE2 125,0,255 // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as PURPLE BUE #define DARKPURPLE1 175,0,255 // if the temperature is less than -18 degrees C switch on NeoP 9 as DARK PURPLE // Number of neopx, connection pin number, pixel type flags:, NEO_GRB = Pixels are wired for GRB bitstream, NEO_KHZ800 = 800 KHz bitstream (w/WS2812 LEDs) Adafruit_NeoPixel neopx = Adafruit_NeoPixel(numberLEDs, neopPin, NEO_GRB + NEO_KHZ800); int const NUMBER_SAMPLES = 10; // Size of buffer (queue) CircularBuffer buffer; // Create the buffer (queue) int bufferPosition2 =0; int incomingbyte; // For incoming Serial data int myincomingbyte; // For incoming mySerial data int brightnessH = 64; int brightnessL = 32; int tempPin = A0; // Selects the input pin for the temperature sensor // INPUT int Temperature; // Initialization of the variable ‘Temperature’ float sensorValueT; int numberofLoops = 0; int newBrightness = 1; SoftwareSerial mySerial(rxPin, txPin); // Set up Serial Port RX, TX void setup() { // Start .. //pinMode(tempPinInside,INPUT); // Inside temperature sensor is in input pin A2 neopx.begin(); // Initializing the NeoPixel library. neopx.show(); // Initialize all NeoPixels OFF buffer.clear(); // Reset the whole buffer to its initial state neopx.setBrightness(64); // Brightness of NeoPixels 35% (a number in the range 0 (off) to 255 (max brightness)) neopx.show(); Serial.begin(9600); mySerial.begin(9600); } void loop() { // Run over and over again /* while(Serial.available()) { // Read the element from the serial monitor ??? while(Serial.available()) { // Read the element from the serial monitor ??? buffer.push((float)Serial.parseFloat()); // Add an element to the buffer. */ /* incomingbyte = Serial.read(); // Read the incoming byte from the computer Serial.println((char)incomingbyte); mySerial.write(incomingbyte); }*/ // Write incoming byte from the computer to the NODEs // NUMBER OF LOOPS. if(numberofLoops == 2) { mySerial.write('1'); while(mySerial.available()) { // Listen the mySerial communication line myincomingbyte = mySerial.read(); // Read the incoming byte from the NODEs if((char)myincomingbyte == 'H') Serial.println("OK"); Serial.println((char)myincomingbyte); //break; } numberofLoops = 0; newBrightness = 1; } float Temp; if(newBrightness == 1) { //for (int bufferPosition=0; bufferPosition-1; bufferPosition--){ //buffer.size() tells you the number of values currently in the buffer. Temp = buffer[bufferPosition]; if (Temp >= 30) { // 15 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(255,0,0)); // if the temperature is greater or equal than 30 degrees C switch ON NeoP 149 as RED neopx.setPixelColor(130+bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 29 but less than 30 degrees C switch on NeoP 130 as ORANGE neopx.setPixelColor(129-bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch on NeoP 129 as ORANGE neopx.setPixelColor(110+bufferPosition, neopx.Color(255,44,0));// if the temperature is greater or equal than 27 but less than 28 degrees C switch on NeoP 110 as YELLOW neopx.setPixelColor(109-bufferPosition, neopx.Color(255,44,0));// if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW neopx.setPixelColor(90+bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,44,255));// if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,44,255));// if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(255,0,0)); // if the temperature is greater or equal than 30 degrees C switch ON NeoP 149 as RED neopx.setPixelColor(130+bufferPosition, neopx.Color(255,75,0)); // if the temperature is greater or equal than 29 but less than 30 degrees C switch on NeoP 130 as ORANGE neopx.setPixelColor(129-bufferPosition, neopx.Color(255,75,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch on NeoP 129 as ORANGE neopx.setPixelColor(110+bufferPosition, neopx.Color(255,255,0));// if the temperature is greater or equal than 27 but less than 28 degrees C switch on NeoP 110 as YELLOW neopx.setPixelColor(109-bufferPosition, neopx.Color(255,255,0));// if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW neopx.setPixelColor(90+bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255));// if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255));// if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=29 && Temp < 30){ // 15-1 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 20 but less than 23 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 29 but less than 30 degrees C switch on NeoP 130 as ORANGE neopx.setPixelColor(129-bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch on NeoP 129 as ORANGE neopx.setPixelColor(110+bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch on NeoP 110 as YELLOW neopx.setPixelColor(109-bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW neopx.setPixelColor(90+bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,44,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 20 but less than 23 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(255,75,0)); // if the temperature is greater or equal than 29 but less than 30 degrees C switch on NeoP 130 as ORANGE neopx.setPixelColor(129-bufferPosition, neopx.Color(255,75,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch on NeoP 129 as ORANGE neopx.setPixelColor(110+bufferPosition, neopx.Color(255,255,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch on NeoP 110 as YELLOW neopx.setPixelColor(109-bufferPosition, neopx.Color(255,255,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW neopx.setPixelColor(90+bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=28 && Temp < 29){ // 15-2 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 20 but less than 23 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 29 but less than 30 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch on NeoP 129 as ORANGE neopx.setPixelColor(110+bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch on NeoP 110 as YELLOW neopx.setPixelColor(109-bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW neopx.setPixelColor(90+bufferPosition, neopx.Color(0,44,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,44,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 20 but less than 23 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 29 but less than 30 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(255,75,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch on NeoP 129 as ORANGE neopx.setPixelColor(110+bufferPosition, neopx.Color(255,255,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch on NeoP 110 as YELLOW neopx.setPixelColor(109-bufferPosition, neopx.Color(255,255,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW neopx.setPixelColor(90+bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=27 && Temp < 28){ // 15-3 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch on NeoP 110 as YELLOW neopx.setPixelColor(109-bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW neopx.setPixelColor(90+bufferPosition, neopx.Color(0,44,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,44,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(255,255,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch on NeoP 110 as YELLOW neopx.setPixelColor(109-bufferPosition, neopx.Color(255,255,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW neopx.setPixelColor(90+bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=26 && Temp < 27){ // 15-4 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW neopx.setPixelColor(90+bufferPosition, neopx.Color(0,44,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,44,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(255,255,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW neopx.setPixelColor(90+bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=25 && Temp < 26){ // 15-5 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,44,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,44,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=24 && Temp < 25) { // 15-6 // Voltage consumption is less than the threshold value 1, the incoming byte is L = LOW if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(GREEN9)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(GREEN9)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=23 && Temp < 24){ // 15-7 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=22 && Temp < 23){ // 15-8 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=21 && Temp < 22){ // 15-9 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=-9 && Temp < -6){ // 15-10 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if ((Temp >=-12) && (Temp < -9)){ // 15-11 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=-15 && Temp < -12){ // 15-12 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=-18 && Temp < -15){ // 15-13 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if(Temp < -18) { // 15-14 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } //delay(100); } newBrightness = 0; } // TEMPERATURE. Read and store the analog input value coming from the temp sensor pin sensorValueT = analogRead(tempPin); // sensorValueT * (5.0 / 1023.0); // Converts the digital value (0 - 1023) to analog voltage (0 - 5V) float T, TempNow; float R = 10000/(1023.0/sensorValueT-1); // Resistance = 10 k ohm/ (1023 float loka = 10000/R; // loka = R0/R T = 0.0033540164 + 0.00026666666 * log(loka); // Steinhart-Hart 1/T=1/T0 + 1/B*ln(R0/R) T = 1/T; TempNow = T - 273.15; // Temperature (Kelvin) -273.15 to get Celcius degrees /* Serial.print("Temperature ");*/ Serial.println(TempNow); /*Serial.println(" C "); */ // BUFFER. //buffer.push((float)Serial.parseFloat()); // Add an element to the buffer. buffer.unshift(TempNow); // Get the temp and push it to the buffer //for (int bufferPosition=0; bufferPosition-1; bufferPosition--){ //buffer.size() tells you the number of values currently in the buffer. Temp = buffer[bufferPosition]; if (Temp >= 30) { // 15 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(RED15)); // if the temperature is greater or equal than 30 degrees C switch ON NeoP 149 as RED neopx.setPixelColor(130+bufferPosition, neopx.Color(255,90,0)); // if the temperature is greater or equal than 29 but less than 30 degrees C switch on NeoP 130 as ORANGE neopx.setPixelColor(129-bufferPosition, neopx.Color(255,125,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch on NeoP 129 as ORANGE neopx.setPixelColor(110+bufferPosition, neopx.Color(255,44,0));// if the temperature is greater or equal than 27 but less than 28 degrees C switch on NeoP 110 as YELLOW neopx.setPixelColor(109-bufferPosition, neopx.Color(255,44,0));// if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW neopx.setPixelColor(90+bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,44,255));// if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,44,255));// if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(255,0,0)); // if the temperature is greater or equal than 30 degrees C switch ON NeoP 149 as RED neopx.setPixelColor(130+bufferPosition, neopx.Color(255,75,0)); // if the temperature is greater or equal than 29 but less than 30 degrees C switch on NeoP 130 as ORANGE neopx.setPixelColor(129-bufferPosition, neopx.Color(255,75,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch on NeoP 129 as ORANGE neopx.setPixelColor(110+bufferPosition, neopx.Color(255,255,0));// if the temperature is greater or equal than 27 but less than 28 degrees C switch on NeoP 110 as YELLOW neopx.setPixelColor(109-bufferPosition, neopx.Color(255,255,0));// if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW neopx.setPixelColor(90+bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255));// if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255));// if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=29 && Temp < 30){ // 15-1 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 20 but less than 23 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 29 but less than 30 degrees C switch on NeoP 130 as ORANGE neopx.setPixelColor(129-bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch on NeoP 129 as ORANGE neopx.setPixelColor(110+bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch on NeoP 110 as YELLOW neopx.setPixelColor(109-bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW neopx.setPixelColor(90+bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,44,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 20 but less than 23 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(255,75,0)); // if the temperature is greater or equal than 29 but less than 30 degrees C switch on NeoP 130 as ORANGE neopx.setPixelColor(129-bufferPosition, neopx.Color(255,75,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch on NeoP 129 as ORANGE neopx.setPixelColor(110+bufferPosition, neopx.Color(255,255,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch on NeoP 110 as YELLOW neopx.setPixelColor(109-bufferPosition, neopx.Color(255,255,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW neopx.setPixelColor(90+bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=28 && Temp < 29){ // 15-2 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 20 but less than 23 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 29 but less than 30 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch on NeoP 129 as ORANGE neopx.setPixelColor(110+bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch on NeoP 110 as YELLOW neopx.setPixelColor(109-bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW neopx.setPixelColor(90+bufferPosition, neopx.Color(0,44,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,44,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 20 but less than 23 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 29 but less than 30 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(255,75,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch on NeoP 129 as ORANGE neopx.setPixelColor(110+bufferPosition, neopx.Color(255,255,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch on NeoP 110 as YELLOW neopx.setPixelColor(109-bufferPosition, neopx.Color(255,255,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW neopx.setPixelColor(90+bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=27 && Temp < 28){ // 15-3 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch on NeoP 110 as YELLOW neopx.setPixelColor(109-bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW neopx.setPixelColor(90+bufferPosition, neopx.Color(0,44,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,44,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(255,255,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch on NeoP 110 as YELLOW neopx.setPixelColor(109-bufferPosition, neopx.Color(255,255,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW neopx.setPixelColor(90+bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=26 && Temp < 27){ // 15-4 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW neopx.setPixelColor(90+bufferPosition, neopx.Color(0,44,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,44,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(255,255,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch on NeoP 109 as YELLOW neopx.setPixelColor(90+bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=25 && Temp < 26){ // 15-5 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,44,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,44,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch on NeoP 90 as LIGHT GREEN neopx.setPixelColor(89-bufferPosition, neopx.Color(0,255,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=24 && Temp < 25) { // 15-6 // Voltage consumption is less than the threshold value 1, the incoming byte is L = LOW if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(255,44,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,44,255)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch on NeoP 89 as LIGHT GREEN neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=23 && Temp < 24){ // 15-7 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch on NeoP 70 as WHITE neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=22 && Temp < 23){ // 15-8 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(255,255,255)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch on NeoP 69 as WHITE neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=21 && Temp < 22){ // 15-9 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=-9 && Temp < -6){ // 15-10 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,255,255)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if ((Temp >=-12) && (Temp < -9)){ // 15-11 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=-15 && Temp < -12){ // 15-12 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,55,255)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if (Temp >=-18 && Temp < -15){ // 15-13 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(75,0,255)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } else if(Temp < -18) { // 15-14 if((char)myincomingbyte == 'L') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } else if((char)myincomingbyte == 'H') { neopx.setPixelColor(149-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 149-bufferPosition neopx.setPixelColor(130+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 130-bufferPosition neopx.setPixelColor(129-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 28 but less than 29 degrees C switch OFF NeoP 129-bufferPosition neopx.setPixelColor(110+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 27 but less than 28 degrees C switch OFF NeoP 110-bufferPosition neopx.setPixelColor(109-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 26 but less than 27 degrees C switch OFF NeoP 109-bufferPosition neopx.setPixelColor(90+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 25 but less than 26 degrees C switch OFF NeoP 90-bufferPosition neopx.setPixelColor(89-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 24 but less than 25 degrees C switch OFF NeoP 89-bufferPosition neopx.setPixelColor(70+bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 23 but less than 24 degrees C switch OFF NeoP 70-bufferPosition neopx.setPixelColor(69-bufferPosition, neopx.Color(0,0,0)); // if the temperature is greater or equal than 22 but less than 23 degrees C switch OFF NeoP 69-bufferPosition neopx.setPixelColor(50+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than 0 but greater than -3 degrees C switch on NeoP 50 as LIGHT BLUE neopx.setPixelColor(49-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -6 but greater than -9 degrees C switch on NeoP 49 as LIGHT BLUE neopx.setPixelColor(30+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -9 but greater than -12 degrees C switch on NeoP 30 as BLUE neopx.setPixelColor(29-bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -12 but greater than -15 degrees C switch on NeoP 29 as BLUE neopx.setPixelColor(10+bufferPosition, neopx.Color(0,0,0)); // if the temperature is less or equal than -15 but greater than -18 degrees C switch on NeoP 10 as DARK PURPLE neopx.setPixelColor(9-bufferPosition, neopx.Color(75,0,255)); // if the temperature is less than -18 degrees C switch on NeoP 9 neopx.show(); } } delay(500); /*Serial.print("Light sensor value is: "); */ /*Serial.println((char)myincomingbyte); */ /*Serial.print("Temperature "); Serial.print(TempNow); Serial.println(" C "); Serial.print(buffer[bufferPosition]); Serial.println(" "); */ } numberofLoops++; }