Git Product home page Git Product logo

adafruit_dotstarmatrix's Introduction

Adafruit_DotStarMatrix. Build Status

Adafruit_GFX-compatible library for DotStar matrices and grids. Controls single and tiled DotStar matrices or grids assembled from DotStar LED strip. Requires Adafruit_DotStar and Adafruit_GFX libraries.

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

adafruit_dotstarmatrix's People

Contributors

evaherrada avatar hoffmannjan avatar ishotjr avatar ladyada avatar paintyourdragon avatar siddacious avatar tdicola avatar tyeth avatar

Stargazers

 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

adafruit_dotstarmatrix's Issues

Bug in HSV color support for DotStar Matrices?

I have assembled a six-panel DotStar Matrix and, while it works, I'm having trouble getting certain colors to show up when using HSV. Some basic colors show as expected (red, white) but others do not (green / magenta and others).

Code follows, then a picture of the result. I'm also seeing other weird behaviors - I have a script that cycles through hues, for example, and it is extremely "flashy" and will inexplicably go from blue to black to yellow while incrementing hue from 0 thru 65536. Decreasing Value also partially works, but also includes lots of flickering to black then back to a dimmer value.

So... I think there is a bug in the HSV color support for DotStar Matrices.

#pragma region Includes and Defines
#include <Adafruit_DotStarMatrix.h>   // For the DotStar Matrix and associated libraries
#include <Adafruit_GFX.h>
#include <Wire.h>
#pragma endregion
#                     
#pragma endregion
#pragma region Instantiations

Adafruit_DotStarMatrix clockDisplay = Adafruit_DotStarMatrix(
   8, 8,                        // single panel is 8 x 8 pixels
   6, 1,                        // the matrix is 6 panels wide and 1 tall
   16, 15,                        // data and clock pins (MOSI and SCK)
   DS_MATRIX_TOP +                  // matrix begins at topmost panel
   DS_MATRIX_LEFT +               // matrix begins on left hand side
   DS_MATRIX_COLUMNS +               // matrix is ordered via columns
   DS_MATRIX_PROGRESSIVE +
   DS_TILE_TOP +                  // first pixel on first panel is at the top
   DS_TILE_LEFT +                  // and leftmost side
   DS_TILE_COLUMNS +               // and is ordered by columns
   DS_TILE_PROGRESSIVE,
   DOTSTAR_BRG);                  // initial "BRG" | bgr doesn't work | rbg doesn't work
#pragma endregion

void setup() {
   clockDisplay.begin();
   clockDisplay.show();            // Initialize all pixels to 'off'
   clockDisplay.setBrightness(10);
}

void loop()
{
#pragma region Debug code

   showStaticColoredBoxes();


   delay(5000);
#pragma endregion
}
void showStaticColoredBoxes() {

   // Box 1: Red
   uint16_t hue = 182;         
   uint8_t saturation = 255;
   uint8_t value = 255;      
   uint32_t rgbcolor = clockDisplay.ColorHSV(hue, saturation, value);
   clockDisplay.fillRect(0, 0, 5, 8, rgbcolor);

   // Box 2: Yellow
    hue = 10922;
    saturation = 255;
    value = 255;
    rgbcolor = clockDisplay.ColorHSV(hue, saturation, value);
   clockDisplay.fillRect(5, 0, 5, 8, rgbcolor);

   // Box 3: Blue
    hue = 43873;
    saturation = 255;
    value = 255;
    rgbcolor = clockDisplay.ColorHSV(hue, saturation, value);
   clockDisplay.fillRect(10, 0, 5, 8, rgbcolor);

   // Box 4: Green
    hue = 20389;
    saturation = 255;
    value = 255;
    rgbcolor = clockDisplay.ColorHSV(hue, saturation, value);
   clockDisplay.fillRect(15, 0, 5, 8, rgbcolor);

   // Box 5: Magenta
   hue = 54795;
   saturation = 255;
   value = 255;
   rgbcolor = clockDisplay.ColorHSV(hue, saturation, value);
   clockDisplay.fillRect(20, 0, 5, 8, rgbcolor);

   // Box 6: White
   hue = 0;
   saturation = 0;
   value = 255;
   rgbcolor = clockDisplay.ColorHSV(hue, saturation, value);
   clockDisplay.fillRect(25, 0, 5, 8, rgbcolor);

   clockDisplay.show();
}

Picture of actual result:

dotstarmatrix photo

Magenta and Green are not the correct colors given the hue.

  • Arduino board: Adafruit ItsyBitsy

  • Arduino IDE version 1.8

  • I know I have the display brightness at only level 10. It's the same basic story at level 150, just exceptionally bright!

  • The matrix is powered from a 5v 2A supply.

Missing in Library Manager

I tried pulling the library for DotStarMatrix from within the Arduino IDE, but it was not listed.

I do see the regular DotStar library (and all the other Adafruit libs) though.

Did I miss somethig?

  • Arduino board: Huzzah Featherwig

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

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

              1) Sketch -> Include Library -> Manage Libraries
              2) search for DotStarMatrix
    
              expected result: the DotStarMatrix library is listed 
              actual result: the DotStarMatrix is not listed
    

Fonts/TomThumb.h

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

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.