Giter Site home page Giter Site logo

adafruit_neomatrix's Introduction

Adafruit_NeoMatrix. Whoa. Build Status

Adafruit_GFX-compatible library for NeoPixel matrices and grids. Controls single and tiled NeoPixel displays such as the Adafruit NeoPixel Shield or grids assembled from Adafruit 60 LED/meter Digital LED strip. Requires Adafruit_NeoPixel and Adafruit_GFX libraries.

After downloading, rename folder to 'Adafruit_NeoMatrix' and install in Arduino Libraries folder. Restart Arduino IDE, then open File->Sketchbook->Library->Adafruit_NeoMatrix->matrixtest sketch.

adafruit_neomatrix's People

Contributors

evaherrada avatar hoffmannjan avatar ladyada avatar marcmerlin avatar paintyourdragon avatar tdicola avatar tonhuisman avatar tyeth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adafruit_neomatrix's Issues

neomatrix in ESP32-S2 am having difficulty

I am building a NEOPIXEL panel (120x15 eventually, but now it is 120x8). I also have two 16x16 panels to test with. The small panels seem to work properly using an Arduino Uno, but it does not have enough memory for the big panel. I have two programs working using the ESP32-S2, but noticed that the program that uses a single panel (and it works!) is coded wrong. It is coded for the starting point to be NEO_MATRIX_TOP + NEO_MATRIX_LEFT, but the panel is wired for top right.

  • Arduino board: ESP32-S2 (Saola-1)

  • Arduino IDE version (found in Arduino -> About Arduino menu): 2.0.0-rc3

  • List the steps to reproduce the problem below (if possible attach a sketch or
    copy the sketch code in too): LIST REPRO STEPS BELOW
    // This works calling for ATMegaZero ESP32-S2
    // This works, but should not.
    //
    #include <Adafruit_GFX.h>
    #include <Adafruit_NeoMatrix.h>
    #include <Adafruit_NeoPixel.h>
    //#ifndef PSTR
    // #define PSTR // Make Arduino Due happy
    //#endif
    #define LED_PIN 18
    #define MATRX_WIDTH 16
    #define MATRX_HEIGHT 8
    Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(
    MATRX_WIDTH, MATRX_HEIGHT, LED_PIN,
    NEO_MATRIX_TOP + NEO_MATRIX_LEFT + NEO_MATRIX_ROWS +
    NEO_MATRIX_ZIGZAG +
    NEO_GRB + NEO_KHZ800);
    const uint16_t colors[] = {
    matrix.Color(255,255,255),matrix.Color(255, 0, 0), matrix.Color(0, 255, 0), matrix.Color(0, 0, 255) };

void setup() {
matrix.begin();
matrix.setTextWrap(false);
matrix.setBrightness(5);
matrix.setTextColor(colors[0]);
}
int x = matrix.width();
int pass = 0;

void loop() {
matrix.fillScreen(0);
matrix.setCursor(x, 0);
matrix.print(F("Hello World"));
if(--x < -36) {
x = matrix.width();
if(++pass >= 4) pass = 0;
matrix.setTextColor(colors[pass]);
}
matrix.show();
delay(100);
}

MatrixGFXDemo Example compilation error

  • Board: ESP8266 NodeMCU
  • Arduino IDE version 1.8.13
  • Steps to reproduce:
    1. Open MatrixGFXDemo example file
    2. Compile gives error:
MatrixGFXDemo:322:1: error: a15 cannot be used in asm here
 }
 ^
MatrixGFXDemo:322:1: error: a15 cannot be used in asm here
exit status 1
a15 cannot be used in asm here

Any ideas what is causing this?
Thanks

Led Color / ws2812b

Hi,

I've got some issue with color functions.
The result is not the same ... and I don't know why.
(I try to play with brightness | color minimize light with it).

But cannot find the same color. (probably the 24bit and 32bit)
(What is the right way to deal with color with my ws2812b matrix)

 Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(32, 8, 3,
  NEO_MATRIX_TOP    + NEO_MATRIX_LEFT +  NEO_MATRIX_COLUMNS + NEO_MATRIX_ZIGZAG ,     /// ZIGZAG for matrix display 
  NEO_RGB            + NEO_KHZ800);
  matrix.setPixelColor(1,0xff7e00);
  matrix.drawPixel(6,7,matrix.Color(0xff,0x7e,00));
  matrix.show();

Thanks.

mixed line and Matrix

Question: I have 32 pixels in a row and then on the same command pin, a matrix (32x4)

Is it possible to drive the matrix using this library giving an "offset"?

Serial.begin() kills neomatrix

I used the matrixtext example for my neopixel array.
I wanted to add builtin serial port to change the message. But, when I add the (Serial.begin();) line array doesn't update.
I used pin 13 on my Arduino Nano, to use the LED an activity light. But there is no activity when serial.begin() is used.
I comment out Serial.begin and matrixtest works, un-comment it, and it stops.

I'm thinking it may be a Timer issue... Like maybe, neomatix library uses same timer as serial port... (I don't know, just guessing)

Thank you for opening an issue on an Adafruit Arduino library repository. To
improve the speed of resolution please review the following guidelines and
common troubleshooting steps below before creating the issue:

  • Do not use GitHub issues for troubleshooting projects and issues. Instead use
    the forums at http://forums.adafruit.com to ask questions and troubleshoot why
    something isn't working as expected. In many cases the problem is a common issue
    that you will more quickly receive help from the forum community. GitHub issues
    are meant for known defects in the code. If you don't know if there is a defect
    in the code then start with troubleshooting on the forum first.

  • If following a tutorial or guide be sure you didn't miss a step. Carefully
    check all of the steps and commands to run have been followed. Consult the
    forum if you're unsure or have questions about steps in a guide/tutorial.

  • For Arduino projects check these very common issues to ensure they don't apply:

    • For uploading sketches or communicating with the board make sure you're using
      a USB data cable and not a USB charge-only cable. It is sometimes
      very hard to tell the difference between a data and charge cable! Try using the
      cable with other devices or swapping to another cable to confirm it is not
      the problem.

    • Be sure you are supplying adequate power to the board. Check the specs of
      your board and plug in an external power supply. In many cases just
      plugging a board into your computer is not enough to power it and other
      peripherals.

    • Double check all soldering joints and connections. Flakey connections
      cause many mysterious problems. See the guide to excellent soldering for examples of good solder joints.

    • Ensure you are using an official Arduino or Adafruit board. We can't
      guarantee a clone board will have the same functionality and work as expected
      with this code and don't support them.

If you're sure this issue is a defect in the code and checked the steps above
please fill in the following fields to provide enough troubleshooting information.
You may delete the guideline and text above to just leave the following details:

  • Arduino board: INSERT ARDUINO BOARD NAME/TYPE HERE

  • Arduino IDE version (found in Arduino -> About Arduino menu): INSERT ARDUINO
    VERSION HERE

  • List the steps to reproduce the problem below (if possible attach a sketch or
    copy the sketch code in too): LIST REPRO STEPS BELOW

Want to Scroll Shapes in matrix

// This #include statement was automatically added by the Spark IDE.
#include "neopixel/neopixel.h"

// This #include statement was automatically added by the Spark IDE.
#include "neomatrix/neomatrix.h"

// This #include statement was automatically added by the Spark IDE.
#include "Adafruit_GFX/Adafruit_GFX.h"

// Color definitions
#define BLUE 0x001F

// IMPORTANT: Set pixel COUNT, PIN and TYPE
#define PIXEL_PIN D6
#define PIXEL_COUNT 238
#define PIXEL_TYPE WS2812B

// I define the pixels as both a strip and a matrix. Mainly because
// I like some of the strip effects from the demo program. I can
// reference either the strip or the matrix in the rest of my code.

Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE); // Define as a strip to do some cool rainbow effects.

Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(17, 14, 6, // Define a NeoMatrix 17 pixels wide by 14
NEO_MATRIX_BOTTOM + NEO_MATRIX_RIGHT + // pixel high on pin 6. Spark core hooked to
NEO_MATRIX_COLUMNS + NEO_MATRIX_ZIGZAG); // the BOTTOM RIGHT and wired by COLUMNS in
// a ZIGZAG pattern. See: http://goo.gl/ci2VhY

// Easier to define all colors needed here.
uint32_t PEACH = matrix.Color(221,171,127);
uint32_t ROSY = matrix.Color(255,176,193);
uint32_t LIGHTBLUE = matrix.Color(94,185,247);
uint32_t RED = matrix.Color(255,0,0);
uint32_t GREEN = matrix.Color(0,255,0);
uint32_t GRAY = matrix.Color(100,100,100);
uint32_t BROWN = matrix.Color(117,76,41);
uint32_t PURPLE = matrix.Color(152,5,229);
uint32_t DARKGREEN = matrix.Color(12,158,17);
uint32_t PINK = matrix.Color(250,101,148);
uint32_t ORANGE = matrix.Color(241,90,41);
uint32_t YELLOW = matrix.Color(255,242,0);
uint32_t BLACK = matrix.Color(0,0,0);
uint32_t WHITE = matrix.Color(255,255,255);

//Variables needed for when we're doing live drawing.
bool isDrawing = false;
bool startDrawing = false;

void setup() {
//Register our Spark function here
Spark.function("showPicture", showPicture); // Register for the showPicture function from iPhone App
Spark.function("drawThePixel", drawThePixel); // Register for the drawPixel function from iPad App
matrix.begin();

// This is just a sequence of RED, GREEN, then OFF(BLACK) so I know the screen reset.
matrix.fillScreen(RED);
matrix.show();                
delay(2000);
matrix.fillScreen(GREEN);
matrix.show();
delay(2000);
matrix.fillScreen(BLACK);
matrix.show();

}

void loop() {

if (startDrawing) {               // Only way I could consistently get it to clear the screen
    matrix.fillScreen(BLACK);     // was to track a temporaray startDrawing boolean to set the 
    matrix.show();                // display to black the first time we hit the main loop again.
    startDrawing = false;         // Otherwise I would always end up with part of the image that
}                                 // was displaying before drawing began on the screen.

//If we are not drawing, run the normal routine.
if(!isDrawing) {                
    normalRoutine();
}

}

// This is my normal routine that just runs through all the different
// images we're created.
void normalRoutine() {
if (startDrawing) { return; } // Check before each item whether we have started drawing.
scrollText(" Merry Christmas!",GREEN,RED);
if (startDrawing) { return; }
delay(1000);
if (startDrawing) { return; }
drawReindeer();
if (startDrawing) { return; }
delay(5000);
if (startDrawing) { return; }
drawHarperPresent();
if (startDrawing) { return; }
delay(5000);
if (startDrawing) { return; }
drawSanta1();
if (startDrawing) { return; }
delay(5000);

}

//Rainbow function from Adafruit Strip Demo.
void rainbow(uint8_t wait) {
uint16_t i, j;

for(j=0; j<256; j++) {
for(i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, Wheel((i+j) & 255));
}
strip.show();
delay(wait);
}
}

// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
if(WheelPos < 85) {
return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
} else if(WheelPos < 170) {
WheelPos -= 85;
return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
} else {
WheelPos -= 170;
return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
}
}

// Function run when we receive a "showPicture" command from the
// iPhone app. Only a few cases are handled because I haven't expanded
// it to handle all the different pictures.
// Input: the string Command we received.
// Return: An Integer that's passed back through the Spark API to the
// iPhone app. 0 for false or "Not Displayed" 1 for true or "Displayed"
int showPicture(String command) {

if (isDrawing) {
    return 0;
}

if (command == "reindeer"){
drawReindeer();
delay(10000);
return 1;
}
else if (command == "santa1") {
drawSanta1();
delay(10000);
return 1;
}
else if (command == "snowman"){
drawSnowman();
delay(10000);
return 1;
}

return 0;

}

// Function run when we receive a "drawPixel" command from the iPad
// app.
// Input: String Command. iPad sends either "startDrawing", "stopDrawing",
// "clearDisplay", or a pixel like "x,y,r,g,b"
// example: "0,0,255,255,255" Pixel 0,0 RGB (255,255,255) or White.

int drawThePixel(String command) {
if (command == "startDrawing") {
if (isDrawing) {
return 2;
}
isDrawing = true;
startDrawing = true;
matrix.fillScreen(BLACK);
matrix.show();
return 1;
}
else if (command == "stopDrawing") {
isDrawing = false;
return 1;
}
else if (command == "clearDisplay") {
matrix.fillScreen(BLACK);
matrix.show();
return 1;
}
else
{
// Yes I know there has to be a more efficient way of parsing this string.
// My "C" programing skills are lacking in the area of string manipulation.
int commaIndex = command.indexOf(',');
int secondCommaIndex = command.indexOf(',', commaIndex+1);
int thirdCommaIndex = command.indexOf(',', secondCommaIndex+1);
int fourthCommaIndex = command.indexOf(',', thirdCommaIndex+1);

    String xCoord = command.substring(0,commaIndex);
    String yCoord = command.substring(commaIndex+1, secondCommaIndex);
    String rValue = command.substring(secondCommaIndex+1, thirdCommaIndex);
    String gValue = command.substring(thirdCommaIndex+1, fourthCommaIndex);
    String bValue = command.substring(fourthCommaIndex+1);
    
    matrix.drawPixel(xCoord.toInt(),yCoord.toInt(),matrix.Color(rValue.toInt(),gValue.toInt(),bValue.toInt()));

    // Show three times because once causes weird things...
    // This tripped me up for a long time. If I only did matrix.show()
    // once, the screen would randomly display the wrong pixels and the
    // wrong colors. Then every third pixel command it would draw right.
    // It was very frustrating. I finally realized if I'd send the command
    // three times, it would work as expected with no noticeable issues
    // on the screen...
    matrix.show();
    matrix.show();
    matrix.show();

    return 1;
}
return 0;

}

// Scroll text function. Basis for this function from the following instructable
// by turnturtle. http://goo.gl/l7tvX9
void scrollText(String text, uint32_t backgroundColor, uint32_t textColor) {

matrix.setTextColor(textColor);
matrix.setTextSize(1);
matrix.setTextWrap(false);

//String text = "    Merry Christmas!"; // sample text

const int width = 3; // width of the marquee display (in characters)

// Loop once through the string

for (int offset = 0; offset < text.length(); offset++)

{

    // Construct the string to display for this iteration

    String t = "";

    for (int i = 0; i < width; i++)

    t += text.charAt((offset + i) % text.length());

    // Print the string for this iteration
   // matrix.setTextColor(randomColor());
    matrix.setCursor(0, 3); // display will be halfway down screen

    matrix.print(t);
    
    matrix.show();

    // Short delay so the text doesn't move too fast

    delay(350);
    
    matrix.fillScreen(backgroundColor);
    matrix.show();

}

}

//function to generate a random color. ;)
uint32_t randomColor() {
uint32_t colorToReturn = matrix.Color(random(0,256),random(0,256),random(0,256));
return colorToReturn;
}

// This is untested. I just found the setBrightness() function.
// It should fade a color to screen...
void fadeToColor(uint32_t color, uint8_t duration)
{
// Valid values for setBrightness are 0-16
for (int i = 0; i <= 16; i++)
{
matrix.fillScreen(color);
matrix.setBrightness(i);
matrix.show();
delay(duration / 16);
}

matrix.setBrightness(16); //Reset brightness for next drawing?

}

// Below here are all the functions to draw the individual pictures.

void drawSanta1() {
matrix.fillScreen(BLACK);
matrix.drawFastHLine(10,1,5,RED);
matrix.drawFastHLine(9,2,7,RED);
matrix.drawFastHLine(8,3,9,RED);
matrix.drawFastHLine(6,4,3,RED);
matrix.drawFastHLine(9,4,8,WHITE);
matrix.drawPixel(5,5,WHITE);
matrix.drawPixel(9,5,WHITE);
matrix.drawPixel(10,5,PEACH);
matrix.drawPixel(11,5,LIGHTBLUE);
matrix.drawPixel(12,5,PEACH);
matrix.drawPixel(13,5,LIGHTBLUE);
matrix.drawPixel(14,5,PEACH);
matrix.drawPixel(15,5,WHITE);
matrix.drawPixel(9,6,WHITE);
matrix.drawPixel(10,6,ROSY);
matrix.drawFastHLine(11,6,3,PEACH);
matrix.drawPixel(14,6,ROSY);
matrix.drawPixel(15,6,WHITE);
matrix.drawPixel(9,7,WHITE);
matrix.drawPixel(10,7,PEACH);
matrix.drawFastHLine(11,7,3,WHITE);
matrix.drawPixel(14,7,PEACH);
matrix.drawPixel(15,7,WHITE);
matrix.drawFastHLine(9,8,3,WHITE);
matrix.drawPixel(12,8,PEACH);
matrix.drawFastHLine(13,8,3,WHITE);
matrix.drawFastHLine(9,9,7,WHITE);
matrix.drawFastHLine(10,10,5,WHITE);
matrix.drawFastHLine(11,11,3,WHITE);

matrix.show();

}

void drawReindeer() {
matrix.fillScreen(WHITE);
matrix.drawFastHLine(5,0,3,GRAY);
matrix.drawFastHLine(10,0,3,GRAY);
matrix.drawPixel(7,1,GRAY);
matrix.drawPixel(10,1,GRAY);
matrix.drawFastHLine(3,2,3,BROWN);
matrix.drawPixel(7,2,GRAY);
matrix.drawPixel(10,2,GRAY);
matrix.drawFastHLine(12,2,3,BROWN);
matrix.drawFastHLine(2,3,4,BROWN);
matrix.drawFastHLine(7,3,4,BROWN);
matrix.drawFastHLine(12,3,4,BROWN);
matrix.drawFastHLine(6,4,6,BROWN);
matrix.drawFastHLine(6,5,6,BROWN);
//Draw whole row for eyes
matrix.drawFastHLine(6,6,6,BROWN);
//Draw Eyes
matrix.drawPixel(7,6,BLACK);
matrix.drawPixel(10,6,BLACK);
matrix.drawFastHLine(6,7,6,BROWN);
matrix.drawFastHLine(6,8,6,BROWN);
matrix.drawFastHLine(7,9,4,BROWN);
matrix.drawFastHLine(7,10,4,BROWN);
matrix.drawFastHLine(7,11,4,BROWN);
matrix.drawPixel(7,12,BROWN);
matrix.drawPixel(10,12,BROWN);
matrix.drawFastHLine(8,12,2,RED);
matrix.drawFastHLine(8,13,2,BROWN);

matrix.show();

}

void drawHarperTree() {
matrix.fillScreen(LIGHTBLUE);
matrix.drawPixel(8,1,YELLOW);
matrix.drawPixel(8,2,GREEN);
matrix.drawFastHLine(7,3,3,GREEN);
matrix.drawPixel(6,4,GREEN);
matrix.drawPixel(7,4,BLUE);
matrix.drawPixel(8,4,GREEN);
matrix.drawPixel(9,4,PURPLE);
matrix.drawFastHLine(5,5,5,GREEN);
matrix.drawFastHLine(5,6,5,GREEN);
matrix.drawFastHLine(4,7,8,GREEN);
matrix.drawFastHLine(4,8,8,GREEN);
matrix.drawPixel(6,8,PINK);
matrix.drawFastHLine(3,9,9,GREEN);
matrix.drawFastHLine(3,10,9,GREEN);
matrix.drawFastHLine(5,11,4,BROWN);
matrix.drawFastHLine(5,12,4,BROWN);
matrix.drawFastHLine(0,13,17,DARKGREEN);

matrix.show();

}

hello sir, i want to scroll this shape or any shape horizotal or vertical in matrix plz give me a function to scroll this. plz help me

three 16*16 ws2812b matrix to create a 48*16 matrix

Hello,

since i want to create a 48*16 matrix made of three 16*16 ws2812b matrix i am looking for a library that let me do that. I am on Arduino nano and every other library (FastLed,...) are to much RAM consuming. Since Neo_Matrix is no consuming that much RAM is it possible to define some thing like:

Adafruit_NeoMatrix matrix1 = Adafruit_NeoMatrix(48,16,PIN,
  NEO_MATRIX_BOTTOM + NEO_MATRIX_RIGHT +
  NEO_MATRIX_COLUMNS + NEO_MATRIX_ZIGZAG,
  NEO_GRB + NEO_KHZ800);

because for now with neo_matrix we are limited to 32*16 matrix

keywords.txt missing?

I've been trying to tinker with one of your snazzy NeoMatrix Shields (5X8) for a couple of days now. After reinstalling Arduino (updated to ver 1.6.13) I've installed the libraries for NeoMatrix, NeoPixel, and GFX — all the newest iterations. Upon testing out the matrixtext code there seems to be a processing problem of sorts. While NeoPixel library turns orange, NeoMatrix and GFX do not. Thus the NeoMatrix object doesn't seem to respond and the code doesn't run on the matrix shield (the "HOWDY" message doesn't show up).

The Pixel library folder included a keywords.txt file. Matrix and GFX appear to be missing a similar document. What should I do to fix this? I was really looking forward to playing around with the matrix but can't do much at the moment.

screen shot 2016-11-25 at 12 30 48 am

initialisation of member 'passThruFlag' forbidden

The NeoMatrix library can't be compiled any more. The following error is thrown when I try to compile my project. Or is it just a setting that I have to give to the compiler?

/home/fgierlinger/Arduino/libraries/Adafruit_NeoMatrix/Adafruit_NeoMatrix.h:101: error: ISO C++ forbids initialization of member ‘passThruFlag’
/home/fgierlinger/Arduino/libraries/Adafruit_NeoMatrix/Adafruit_NeoMatrix.h:101: error: making ‘passThruFlag’ static
/home/fgierlinger/Arduino/libraries/Adafruit_NeoMatrix/Adafruit_NeoMatrix.h:101: error: ISO C++ forbids in-class initialization of non-const static member ‘passThruFlag’

I'm using Eclipse Mars (4.5.0) with the Arduino IDE plugin for Eclipse and Arduino 1.5.2.

Tiled example wiring?

I'm working on a LED-wall project using neopixels stripes. The setup is roughly 36 columns of 120 LEDs.

I can't understand the difference between the tiled matrix example & the non-tiled one. They both seem to use a single PIN, so it looks like both have chained PWM? What would be the maximum number of LED using a single PWM line?

Was thinking of using two servo-shields to manage 18 tiles (120*2 led, a 4m strip cut in half & put 180° down with their own power supply). Would this be doable with this library? How would I handle the 18 separate PWMs?

Thanks a lot!

NeoMatrix text wobbling, its moving up and down

I'm running the matrixtest example on 10x10 ws2811 matrix. I have just changed the height and width while declaring the matrix, everything else is original code. I have double checked the wiring.

The problem is the text is jumping up and and down along with moving left. I have drawn a vertical line moving left and the line is similarly jumping up and down while moving towards left. I have tried on both Arduino Uno and Esp8266, still no luck. I have reinstalled all the libraries, still issue persists. Any help is appreciated !

Want to Scroll Array Plz Help

Hello Dear Master,
i want to scroll an Array in this code horizontaly and vertically 8x8 matrix plz help me

#include <Adafruit_NeoPixel.h>
#define PIN 6
#define MAX_LED 64
uint32_t LEDColour;
unsigned char x = 0;
unsigned char Colour[3];
unsigned char heart[10] = {12, 13, 17, 20, 26, 29, 33, 36, 44, 45};

Adafruit_NeoPixel strip = Adafruit_NeoPixel( MAX_LED, PIN, NEO_RGB + NEO_KHZ800 );
void setup() {
// put your setup code here, to run once:
strip.begin();
//
strip.show();
}

void loop() {

for (char number = 0; number < 64; number++) //
strip.setPixelColor(number, 0);
strip.show();//

// delay(1000);
for (char number = 0; number < 10; number++) //
strip.setPixelColor(heart[number], 255,0,0); // i want to scroll that heart array
strip.show();//
delay(1000);
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.