From d6f5612f9f15d2c9f426eb2d464ba441ec06d404 Mon Sep 17 00:00:00 2001 From: Gregg Date: Mon, 24 Jul 2023 09:24:58 -0500 Subject: [PATCH] Update Pixel.ino changed nPixels from uint8_t to int to allow for longer pixel strands (library is coded for int, so there is no need to limit to uint8_t in the example). --- examples/Other Examples/Pixel/Pixel.ino | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/Other Examples/Pixel/Pixel.ino b/examples/Other Examples/Pixel/Pixel.ino index 5723de4..7c78dd6 100644 --- a/examples/Other Examples/Pixel/Pixel.ino +++ b/examples/Other Examples/Pixel/Pixel.ino @@ -72,9 +72,9 @@ struct NeoPixel_RGB : Service::LightBulb { // Addressable single-wire RGB L Characteristic::Saturation S{0,true}; Characteristic::Brightness V{100,true}; Pixel *pixel; - uint8_t nPixels; + int nPixels; - NeoPixel_RGB(uint8_t pin, uint8_t nPixels) : Service::LightBulb(){ + NeoPixel_RGB(uint8_t pin, int nPixels) : Service::LightBulb(){ V.setRange(5,100,1); // sets the range of the Brightness to be from a min of 5%, to a max of 100%, in steps of 1% pixel=new Pixel(pin); // creates Pixel LED on specified pin @@ -106,9 +106,9 @@ struct NeoPixel_RGBW : Service::LightBulb { // Addressable single-wire RGBW Characteristic::Brightness V{100,true}; Characteristic::ColorTemperature T{140,true}; Pixel *pixel; - uint8_t nPixels; + int nPixels; - NeoPixel_RGBW(uint8_t pin, uint8_t nPixels) : Service::LightBulb(){ + NeoPixel_RGBW(uint8_t pin, int nPixels) : Service::LightBulb(){ V.setRange(5,100,1); // sets the range of the Brightness to be from a min of 5%, to a max of 100%, in steps of 1% pixel=new Pixel(pin,true); // creates Pixel RGBW LED (second parameter set to true for RGBW) on specified pin @@ -142,9 +142,9 @@ struct DotStar_RGB : Service::LightBulb { // Addressable two-wire RGB LED S Characteristic::Saturation S{0,true}; Characteristic::Brightness V{100,true}; Dot *pixel; - uint8_t nPixels; + int nPixels; - DotStar_RGB(uint8_t dataPin, uint8_t clockPin, uint8_t nPixels) : Service::LightBulb(){ + DotStar_RGB(uint8_t dataPin, uint8_t clockPin, int nPixels) : Service::LightBulb(){ V.setRange(5,100,1); // sets the range of the Brightness to be from a min of 5%, to a max of 100%, in steps of 1% pixel=new Dot(dataPin,clockPin); // creates Dot LED on specified pins