Activity Forums Questions & Troubleshooting Neopixel and Controllino

  • Neopixel and Controllino

  • tobiasriss

    Member
    August 23, 2021 at 10:56 am

    Hi there,

    I am a little confused.

    I want to control neopixels. Everything works with the Arduino MEGA 2560. But when I use the same program with Conntrollino MAXI, unfortunately no LED flashes. What am I doing wrong?

    I have included a sample code:

    #include <Controllino.h>

    #include <Adafruit_NeoPixel.h>

    #define PIN CONTROLLINO_D0

    #define NUMPIXELS 40

    Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

    int pause=100;


    void setup() {

    pixels.begin();

    }

    void loop() {

    pixels.setPixelColor(1, pixels.Color(0,255,0)); // Pixel1 leuchtet in der Farbe Grün

    pixels.show();

    delay (pause);

    pixels.setPixelColor(2, pixels.Color(0,150,0));

    pixels.show();

    delay (pause);

    pixels.setPixelColor(3, pixels.Color(0,50,0));

    pixels.show();

    delay (pause);

    pixels.setPixelColor(4, pixels.Color(0,10,0));

    pixels.show();

    delay (pause);

    pixels.setPixelColor(5, pixels.Color(0,1,0));

    pixels.show();

    delay (pause);

    pixels.setPixelColor(1, pixels.Color(0,0,0));

    pixels.setPixelColor(2, pixels.Color(0,0,0));

    pixels.setPixelColor(3, pixels.Color(0,0,0));

    pixels.setPixelColor(4, pixels.Color(0,0,0));

    pixels.setPixelColor(5, pixels.Color(0,0,0));

    pixels.show();

    delay (pause);

    }

Viewing 1 of 1 replies

Log in to reply.

Original Post
0 of 0 posts June 2018
Now