Giter Club home page Giter Club logo

pixie_chroma's Introduction


PIXIE CHROMA is a dual-5x7 character display for Arduino, that can be easily chained to create easy-to-use displays as long or tall as you'd like! Featuring 70 addressable RGB LEDs, Pixie Chroma can be controlled with as little as a single GPIO! (Make sure to follow our Twitter for official news!)


  · · ·   GETTING STARTED   · · ·   LIBRARY DOCS   · · ·   DATASHEET   · · ·   OSHW   · · ·   PURCHASE   · · ·  


Pixie Chroma Is the Display We Always Wanted

HELLO WORLD

Pixie Chroma is a project that we here at Lixie Labs are incredibly passionate about! In this third iteration, we have finally created the best RGB text display we've ever used. While we loved our original Pixie models, we felt that you couldn't get the same level of creativity that you can get with Pixie Chroma. With its ability to be dropped into any breadboard and coded with any experience level, these displays have a wide range of potential uses, meaning anybody in the maker community can find a use for them! Pixie Chroma is our gift to you.

CHROMA_DEMO

Two Big New Features

Along with full RGB control, and an absolute UNIT of an Arduino Library, we are introducing two other big new features with this release: Quad Mode and Shortcodes.


PIXIE CHROMA

Quad mode is made specifically for those wishing to drive their displays faster. By optionally sending the data in four parallel streams with Quad Mode, you can expect to see a ~3.75x increase in speed! For example, if you had 12 Pixie Chromas, you can wire four GPIO of your microcontroller to the 1st, 4th, 7th, and 10th Pixie. Each GPIO is now only responsible for the data of three Pixie Chromas compared to only one GPIO feeding all 12. With this, you can run animations, scrolling, and color palettes more smoothly or free up processor time!

NOTE: Quad Mode currently uses hard-coded GPIO pins depending on your microcontroller. To see which pins are needed, visit the documentation for begin_quad().


PIXIE CHROMA

Our next big feature is Shortcodes, a super simple way to show icons beyond the alphanumeric ASCII set and easily create animations! We have an extensive library of 230+ built-in icons that are accessible by name within other strings. See the example above. Whether you want global currency symbols, weather states, schematic symbols, diacritics (àãåâä), or various mathematical typography such as pi, we probably have you covered. And, if we don't, you can make your own with the magical Shortcode Editor.

Shortcode Editor

Our favorite part of these icons is how easy it is to make your own! With our online/offline editor, you can create any shape or image (so long as it fits in a 5x7 grid) and the editor will directly show the code that would print that shape!

PIXIE CHROMA

This is one of the most creative outlets for cool display enthusiasts, since you can easily make custom frame-by-frame animations of your own! We are currently working on a way to create looping animations directly within the editor, and are excited to show it when it is complete.

A New Standard for Arduino Libraries

We pride ourselves in how easy our products are to use. We have kept the wiring very simple, with only three wires connected to each breadboard-friendly display. Our code also has many examples that are explained line-by-line so that anybody can understand them. We even include template Arduino Sketches to skip the parts newcomers find tedious, like #include directives and class definitions. Many advanced projects that even seasoned coders would find challenging are hassle-free with the Pixie Chroma library!

#include "Pixie_Chroma.h" // Include library
PixieChroma pix;
#define PIXIES_X  6  // Total amount and         x x x x x x
#define PIXIES_Y  2  // arrangement of Pixies =  x x x x x x

void setup() {
  pix.begin( 13, PIXIES_X, PIXIES_Y ); // ... Use Pin 13
  pix.color( CRGB::Blue ); // ............... Set color to blue
}

void loop() {
  pix.clear(); // ..................... Clear display
  pix.println( "Hello World!" ); // ... Write text on first row
  pix.print( millis() ); // ........... Write the value of millis() on the second row
  pix.show(); // ...................... Show changes
}

Amazing Documentation

Pixie Chroma's documentation is complete, accurate, and easy to understand. Each function in the library is fully documented and code examples are sprinkled liberally throughout.

PIXIE CHROMA

Supported Platforms

Pixie Chroma is a bit RAM heavy for its effects and color processing. 8 Pixie Chroma PCBs is 560 LEDs, so that's 1,680 bytes just for the color data! Add in the masking tricks, XY mapping and more, and you're unfortunately not going to get a set of Chromas working on an older microcontroller like the ATMega328p with only 2K of SRAM. However, more modern controllers like those from Espressif are perfectly fine! (ESP8266 has 80KiB of RAM!)

The Pixie Chroma library also uses FastLED as a dependency, so FastLED itself also needs compatibility before we can support it here. This is why the RP2040 is not yet supported. Soon!

Fully Supported Microcontrollers

  • ESP8266 (Adafruit HUZZAH, Wemos D1 Mini, etc.)
  • ESP32 / ESP32-S2 (TinyPico, HUZZAH32, TinyS2)
  • Teensy 3.x (Possibly Teensy 4.x, not yet tested)

Currently Planned Support

  • RP2040 (Needs FastLED port)
  • ESP32-S2 (Needs testing) Confirmed working
  • ESP32-S3 (Needs testing)
  • SAMD21 (TODO, has been hard to get)

If you have success running Pixie Chroma on a controller not currently in this list, let us know! We'd be happy to incorporate it. (You'll need to modify Pixie_Chroma.h to accept the new compilation target first.)

PIXIE CHROMA GIF

Dedication to Our Craft

Lixie Labs is a homegrown business dedicated to furthering open source hardware and software in both the hobbyist and professional electronics industry. To this day, we still receive emails from customers asking us how to get their hands on products we no longer produce. Luckily, anybody can still create their own Lixies or even earlier versions of Pixies without us because we've left the entire process open for others. We hope to see all of our projects outlive us!

Pixie Chroma is OSHWA certified (UID US002058), we've created an extensive datasheet, and every single function within the library comes with documentation.

OSHW INFO

Features & Specifications

  • Dual-5x7 RGB LED matrices
  • 3.7 to 5.5 VDC supply
  • Fast bitmap control
  • 8-bit global dimming
  • 27.5 mm x 16.5 mm matrix size (10.16 PPI)
  • 30 mm x 24 mm package

PIXIE CHROMA

Comparison Table

Pixie Chroma 5x5 RGB Matrix Breakout Dot Star 8x8 Grid
Manufacturer Lixie Labs Pimoroni Adafruit
Size 30 mm x 24 mm 19 mm x 29 mm 25 mm x 36 mm
LED Count Dual 5x7 displays, 70 total Single 5x5 display, 25 total Single 8x8 display, 64 total
Pixels Per Inch 10.16 PPI 7.25 PPI 8 PPI
Experience Level All Levels Intermediate Beginner
Open Source HW + SW SW only HW + SW
Documented Code Functions Yes No Yes
Datasheet Yes No No
Quad Mode ¹ Yes No (no parallel output) No (no parallel output)
Shortcodes ² Yes (239 included) N/A N/A
Breadboard Compatible Yes No No
Power Management Features Yes No No
Easy Text Rendering Yes No No
Non Blocking Animation Yes No No
Predefined Color Palettes and Animations Yes No No
Price Per LED $0.32 $0.49 $0.39

¹ Quad Mode allows you to update your displays faster by using four GPIO at once!
² Shortcodes like [:HEART:] let you use over 230 built-in icons by name and even create your own!

Support & Documentation

As you can see, Pixie Chroma is as easy or as advanced as you need. Luckily, you don't need to dive into documentation to get started - the included examples (File -> Examples -> Pixie_Chroma) provide a template you can easily modify for your own projects.

For further information, you can check out the:

Everything is open source and available. Our source code has been fully documented and all PCB designs and parts used are open and available:

Sponsors

Credits

Developed by Connor Nishijima for Lixie Labs (2021)

pixie_chroma's People

Contributors

connornishijima avatar github-actions[bot] avatar imgbotapp avatar ladylixielabs 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

Watchers

 avatar  avatar  avatar  avatar  avatar

pixie_chroma's Issues

Fix "first led" being on in the mask upon initialization

Fix "first led" being on in the mask upon initialization

This is most visible using begin_quad(). (The color of the erroneous

LED is from the color map.)

// TODO: Fix "first led" being on in the mask upon initialization


        pix.print( "Hello!" );
*///............................................................................
PixieChroma::PixieChroma(){}
// TODO: Fix "first led" being on in the mask upon initialization
// This is most visible using begin_quad(). (The color of the erroneous
// LED is from the color map.)  


/*! ############################################################################

7bd971b8cde3dec45c9b56ed46e91abb53f20206

Cannot convert CRGB to uint8_t

Describe the bug
Error while compiling code:
...\Arduino\libraries\Pixie_Chroma\src\pixie_chroma_internal.cpp: In member function 'void PixieChroma::color_blur_x(fract8)':
...\Arduino\libraries\Pixie_Chroma\src\pixie_chroma_internal.cpp:1874:25: error: cannot convert 'CRGB' to 'uint8_t' {aka 'unsigned char'} in assignment
carryover = part;
-------------^~~~

running arduino ide 2.2.1 with a fresh install of the library and all dependencies.

write_pix(char*) should never modify cursor position

write_pix(char*) should never modify cursor position

Use an internal offset (+user offset) to place chars instead

// TODO: write_pix(char*) should never modify cursor position


	uint8_t len = strlen(message);
	for(uint8_t i = 0; i < len; i++){
		if(message[i] == '\n'){ // Newline, force line break
			// TODO: write_pix(char*) should never modify cursor position
			// Use an internal offset (+user offset) to place chars instead
			cursor_x = 1;
			cursor_y += display_height;

2407e2abeaaa4a8ad6e10bc58f2789270fbf7c13

pix.print( digitalRead(p) ); does not work on Teensy 3.2

pix.print( digitalRead(p) ); does not work on Teensy 3.2

02_Quad_Mode:30: error: call of overloaded 'print(uint8_t)' is ambiguous

pix.print( digitalRead(6) );

// TODO: pix.print( digitalRead(p) ); does not work on Teensy 3.2


//     justify(CENTER); // Mask centered here
//     show();

// TODO: pix.print( digitalRead(p) ); does not work on Teensy 3.2
// 02_Quad_Mode:30: error: call of overloaded 'print(uint8_t)' is ambiguous
// `pix.print( digitalRead(6) );`


/*! Modes for updating Pixie Chroma displays */
enum t_update_mode {
	AUTOMATIC, /*!< Will call show() at a specified FPS using an ISR */

d56b41a76f50fd26eb2f219b00e1c0bbc5cec256

Fix cursor update issues with write_pix(char*)

Fix cursor update issues with write_pix(char*)

// TODO: Fix cursor update issues with write_pix(char*)


	cursor_x += display_width;
}

//  TODO: Fix cursor update issues with write_pix(char*)
/**************************************************************************/
/*!
    @brief  Internal function for rendering char* strings to the mask

ef0924b16d0f3dcc50438a708662c1a9d77c6893

Icon Generator needs to be fully ported from the original Pixie library to work ...

Icon Generator needs to be fully ported from the original Pixie library to work with Pixie Chroma-format Icons and files

// TODO: Icon Generator needs to be fully ported from the original Pixie library to work with Pixie Chroma-format Icons and files


// TODO: 14_Icon_Library.ino needs content

// TODO: Icon Generator needs to be fully ported from the original Pixie library to work with Pixie Chroma-format Icons and files

#include "Pixie_Chroma.h"
PixieChroma pix;


329e2e2930ac85fb8c5f29b29e49195bbb741d99

FastLED interrupt is hanging on esp32

Describe the bug
I had the same issue on a TinyPico and a Feather esp32. Calling pix.begin causes a failure in the FastLED.show method because Pixie Chroma is calling noInterrupts. FastLED is waiting for interrupts to fire but the interrupts have been disabled causing it to hang and fail with watchdog.

I had this code working in April of last year, but trying to flash it recently caused this issue. If I comment out the noInterrupts and interrupts calls in Pixie Chroma lib it is able to print to the LED screens.

To Reproduce
Steps to reproduce the behavior (using the Getting Started)

  1. pix.begin( DATA_PIN, PIXIES_X, PIXIES_Y ); with an esp32.
  2. Build and upload with platform io
  3. See error:
WARNING Found stack trace! Trying to decode it
WARNING Decoded 0x40091487: vListInsert at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/list.c:183
WARNING Decoded 0x400901a7: vTaskPlaceOnEventList at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/tasks.c:3566
WARNING Decoded 0x4008f52a: xQueueSemaphoreTake at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/queue.c:1688
WARNING Decoded 0x400f0181: ClocklessController<5, 60, 150, 90, (EOrder)66, 0, false, 5>::showPixels(PixelController<(EOrder)66, 1, 4294967295u>&) at /Users/joetaylor/Development/esphome-pixie-chroma/.esphome/build/pixie-chroma/.piolibdeps/pixie-chroma/FastLED/platforms/esp/32/clockless_i2s_esp32.h:582
 (inlined by) ClocklessController<5, 60, 150, 90, (EOrder)66, 0, false, 5>::showPixels(PixelController<(EOrder)66, 1, 4294967295u>&) at /Users/joetaylor/Development/esphome-pixie-chroma/.esphome/build/pixie-chroma/.piolibdeps/pixie-chroma/FastLED/platforms/esp/32/clockless_i2s_esp32.h:546
WARNING Decoded 0x400e5529: CPixelLEDController<(EOrder)66, 1, 4294967295u>::show(CRGB const*, int, CRGB) at /Users/joetaylor/Development/esphome-pixie-chroma/.esphome/build/pixie-chroma/.piolibdeps/pixie-chroma/FastLED/controller.h:408
WARNING Decoded 0x400d2771: CLEDController::showLeds(unsigned char) at /Users/joetaylor/Development/esphome-pixie-chroma/.esphome/build/pixie-chroma/.piolibdeps/pixie-chroma/FastLED/controller.h:90
 (inlined by) CFastLED::show(unsigned char) at /Users/joetaylor/Development/esphome-pixie-chroma/.esphome/build/pixie-chroma/.piolibdeps/pixie-chroma/FastLED/FastLED.cpp:59
WARNING Decoded 0x400e2ef1: CFastLED::show() at /Users/joetaylor/Development/esphome-pixie-chroma/.esphome/build/pixie-chroma/.piolibdeps/pixie-chroma/FastLED/FastLED.h:500
 (inlined by) PixieChroma::show() at /Users/joetaylor/Development/esphome-pixie-chroma/.esphome/build/pixie-chroma/.piolibdeps/pixie-chroma/Pixie_Chroma/src/pixie_chroma_internal.cpp:2419
WARNING Decoded 0x400e2f25: PixieChroma::set_animation(void (*)(PixieChroma*, float)) at /Users/joetaylor/Development/esphome-pixie-chroma/.esphome/build/pixie-chroma/.piolibdeps/pixie-chroma/Pixie_Chroma/src/pixie_chroma_internal.cpp:346
WARNING Decoded 0x400e391c: PixieChroma::begin(unsigned char, unsigned char, unsigned char) at /Users/joetaylor/Development/esphome-pixie-chroma/.esphome/build/pixie-chroma/.piolibdeps/pixie-chroma/Pixie_Chroma/src/pixie_chroma_internal.cpp:105

(Note: this error is from my espHome module but the same error and trace happens from a fresh arduino platform io build as well)

Expected behavior
Begin should no panic at Watchdog causing any programs to fail.

Desktop (please complete the following information):

  • framework-arduinoespressif32 @ 3.20006.221224 (2.0.6)
    Dependency Graph
    |-- Pixie_Chroma @ 1.2.0
    | |-- Ticker @ 2.0.0
    | |-- FastLED @ 3.5.0
    | | |-- SPI @ 2.0.0

Port finish_ci.sh from Bash to Python

Port finish_ci.sh from Bash to Python

# TODO: Port finish_ci.sh from Bash to Python

#!/bin/bash
# This is just for GitHub, and is used to clean up leftover files after automatic testing has completed! ;)
# TODO: Port finish_ci.sh from Bash to Python

python ./extras/scripts/generate_doxygen_report.py
python ./extras/scripts/generate_keywords_report.py

987adb776fb60da5e2e33876c27d8bb3068783a9

Convert all Doxygen comments to a more compact style

Convert all Doxygen comments to a more compact style

// (Seen here)

########################################################################

// TODO: Convert all Doxygen comments to a more compact style


	set_max_power(5, 500); // ------------ Set default power budget in volts and milliamps
}

// TODO: Convert all Doxygen comments to a more compact style
//       (Seen here)
/*########################################################################*/
/*! @brief  Takes an 8-bit brightness value and passes it to FastLED
            internally, to provide global brightness control with temporal
            dithering.
	
    @param  level 8-bit global brightness value (0-255)
..........................................................................*/
void PixieChroma::set_brightness(uint8_t level){
	brightness_level = level;
}


/*########################################################################*/
/*! @brief  Accepts a const uint8_t (8-bit) array with the following format
            to generate a FastLED Gradient Palette at runtime:

                const uint8_t* my_gradient_palette[] = {

995c8ad280d969329c706ca4ed869363bf3387af

PixieChroma::set_update_mode(t_update_mode, uint16_t)

In member function 'void PixieChroma::set_update_mode(t_update_mode, uint16_t)':
C:\Users\Cicero\Documents\Arduino\libraries\Pixie_Chroma\src\pixie_chroma_internal.cpp:521:4:
error: no matching function for call to 'Ticker::attach_ms<PixieChroma*>
(float, PixieChroma::set_update_mode(t_update_mode, uint16_t)::<lambda(PixieChroma*)>, PixieChroma*)'
521 | );
| ^

In file included from C:\Users\Cicero\Documents\Arduino\libraries\Pixie_Chroma\src\Pixie_Chroma.h:58,
from C:\Users\Cicero\Documents\Arduino\libraries\Pixie_Chroma\src\pixie_chroma_internal.cpp:10:
C:\Users\Cicero\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\Ticker\src/Ticker.h:116:10:
note: candidate: 'template<class Func, class Arg> void Ticker::attach_ms(uint32_t, Func, Arg)'
116 | void attach_ms(uint32_t milliseconds, Func func, Arg arg)
| ^~~~~~~~~

Throws FastLED errors for ESP32-S2 and ESP32-S3

Describe the bug
When building for an ESP32-S2 or ESP32-S3, Pixie_Chroma configures FastLED to use I2S support. Unfortunately FastLED's I2S code doesn't compile properly for these targets and throws errors.

The code in Pixie_Chroma that calls FastLED.addLeds<>() for different pins uses pins that are not available on the ESP32-S2 and ESP32-S3, causing FastLED to throw compile-time errors. It also doesn't allow for a few pins that are only available on those targets.

Pixie_Chroma also tries to use pin 27 for Quad Mode support. Pin 27 isn't available on the ESP32-S2 or ESP32-S3, and FastLED disallows it, throwing another error.

To Reproduce
Steps to reproduce the behavior:

  1. Build any example using an ESP32-S2 or ESP32-S3 board as a target.

Expected behavior
Pixie Chroma should configure FastLED properly to build for ESP32-S2 and ESP32-S3 targets. FastLED's I2S support doesn't build properly for these targets, and it allows and disallows the use of different pins for these targets.

When building for an ESP32-S2 or ESP32-S3 Pixie Chroma should let FastLED use its default configuration and should allow the use of all available pins on those boards and not try to use unavailable pins (like pin 27).

Screenshots
FastLED I2S issues:

Compiling .pio/build/lolin_s2_mini/lib46f/Pixie_Chroma/utility/pixie_animations.cpp.o
In file included from .pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/fastled_esp32.h:10,
                 from .pio/libdeps/lolin_s2_mini/FastLED/src/platforms.h:36,
                 from .pio/libdeps/lolin_s2_mini/FastLED/src/FastLED.h:54,
                 from .pio/libdeps/lolin_s2_mini/Pixie_Chroma/src/Pixie_Chroma.h:74,
                 from .pio/libdeps/lolin_s2_mini/Pixie_Chroma/src/pixie_chroma_internal.cpp:13:
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h: In static member function 'static void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::i2sInit()':
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h:458:20: error: 'I2S1' was not declared in this scope
             i2s = &I2S1;
                    ^~~~
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h:458:20: note: suggested alternative: 'I2S0'
             i2s = &I2S1;
                    ^~~~
                    I2S0
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h:459:34: error: 'PERIPH_I2S1_MODULE' was not declared in this scope
             periph_module_enable(PERIPH_I2S1_MODULE);
                                  ^~~~~~~~~~~~~~~~~~
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h:459:34: note: suggested alternative: 'PERIPH_I2S0_MODULE'
             periph_module_enable(PERIPH_I2S1_MODULE);
                                  ^~~~~~~~~~~~~~~~~~
                                  PERIPH_I2S0_MODULE
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h:460:31: error: 'ETS_I2S1_INTR_SOURCE' was not declared in this scope
             interruptSource = ETS_I2S1_INTR_SOURCE;
                               ^~~~~~~~~~~~~~~~~~~~
In file included from .pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/fastled_esp32.h:10,
                 from .pio/libdeps/lolin_s2_mini/FastLED/src/platforms.h:36,
                 from .pio/libdeps/lolin_s2_mini/FastLED/src/FastLED.h:54,
                 from .pio/libdeps/lolin_s2_mini/Pixie_Chroma/src/utility/../Pixie_Chroma.h:74,
                 from .pio/libdeps/lolin_s2_mini/Pixie_Chroma/src/utility/pixie_animations.h:13,
                 from .pio/libdeps/lolin_s2_mini/Pixie_Chroma/src/utility/pixie_animations.cpp:10:
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h: In static member function 'static void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::i2sInit()':
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h:458:20: error: 'I2S1' was not declared in this scope

FastLED pin issues:

In file included from .pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/fastled_esp32.h:10,
                 from .pio/libdeps/lolin_s2_mini/FastLED/src/platforms.h:36,
                 from .pio/libdeps/lolin_s2_mini/FastLED/src/FastLED.h:54,
                 from .pio/libdeps/lolin_s2_mini/Pixie_Chroma/src/Pixie_Chroma.h:74,
                 from .pio/libdeps/lolin_s2_mini/Pixie_Chroma/src/pixie_chroma_internal.cpp:13:
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h: In instantiation of 'class ClocklessController<27, 60, 150, 90, (EOrder)66, 0, false, 5>':
.pio/libdeps/lolin_s2_mini/FastLED/src/chipsets.h:578:7:   required from 'class WS2812Controller800Khz<27, (EOrder)66>'
.pio/libdeps/lolin_s2_mini/FastLED/src/FastLED.h:94:34:   required from 'class NEOPIXEL<27>'
.pio/libdeps/lolin_s2_mini/FastLED/src/FastLED.h:316:28:   required from 'static CLEDController& CFastLED::addLeds(CRGB*, int, int) [with CHIPSET = NEOPIXEL; unsigned char DATA_PIN = 27]'
.pio/libdeps/lolin_s2_mini/Pixie_Chroma/src/pixie_chroma_internal.cpp:265:3:   required from here
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h:205:46: error: static assertion failed: Invalid pin specified
     static_assert(FastPin<DATA_PIN>::validpin(), "Invalid pin specified");
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~

.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h: In instantiation of 'class ClocklessController<22, 60, 150, 90, (EOrder)66, 0, false, 5>':
.pio/libdeps/lolin_s2_mini/FastLED/src/chipsets.h:578:7:   required from 'class WS2812Controller800Khz<22, (EOrder)66>'
.pio/libdeps/lolin_s2_mini/FastLED/src/FastLED.h:107:52:   required from 'class WS2812B<22, (EOrder)66>'
.pio/libdeps/lolin_s2_mini/FastLED/src/FastLED.h:304:39:   required from 'static CLEDController& CFastLED::addLeds(CRGB*, int, int) [with CHIPSET = WS2812B; unsigned char DATA_PIN = 22; EOrder RGB_ORDER = (EOrder)66]'
.pio/libdeps/lolin_s2_mini/Pixie_Chroma/src/pixie_chroma_internal.cpp:2619:86:   required from here
.pio/libdeps/lolin_s2_mini/FastLED/src/platforms/esp/32/clockless_i2s_esp32.h:205:46: error: static assertion failed: Invalid pin specified

I'm building with PlatformIO but I confirmed the same problems happen building with Arduino.

Desktop (please complete the following information):

  • FastLED 3.5.0
  • Pixie Chroma Version 1.2.0

Additional context
I'll submit a PR that should fix these problems. I've confirmed it works using a couple of different ESP32-S2 boards. For quad mode I substituted pin 26 for pin 27; I just picked that randomly and have no idea if you'd want to stick with that.

I added support in the CI file to test builds for both the S2 and S3 but I'm having lots of issues with CI failing in code I didn't touch, so that's not working.

I'd be happy to send you some ESP32-S2 and ESP32-S3 boards if you'd like.

The Pixie Chromas are really cool, nice job!

write_pix( char* ) should never modify cursor position

write_pix( char* ) should never modify cursor position

Use an internal offset ( +user offset ) to place chars instead

// TODO: write_pix( char* ) should never modify cursor position


    @param    x_pos    X pixel position of write **[optional]**
    @param    y_pos    Y pixel position of write **[optional]**
*///............................................................................
void PixieChroma::write_pix( char* message, int16_t x_offset, int16_t y_offset ){
	uint8_t len = strlen( message );
	for( uint8_t i = 0; i < len; i++ ){
		if( message[i] == '\n' ){ // Newline, force line break
			// TODO: write_pix( char* ) should never modify cursor position
			// Use an internal offset ( +user offset ) to place chars instead
			cursor_x =  display_padding_x;
			cursor_y += display_height;
		}
		else if( line_wrap == true && cursor_x >= ( display_width * chars_x ) ){ // End of line reached, wrap to new line if line_wrap enabled
			cursor_x =  display_padding_x;
			cursor_y += display_height;
			
			add_char(
				message[i],
				cursor_x + x_offset,
				cursor_y + y_offset
			);
			cursor_x += display_width;
		}
		else if( message[i] == 0 || message[i] == '\0' ){ // end of string
			return;
		}
		else{ // Normal
			add_char(
				message[i],
				cursor_x + x_offset,
				cursor_y + y_offset
			);
			cursor_x += display_width;
		}		
	}

b80daf9a86325d81ea4cfc81f1abac6dfc586df3

Add justify(justification, row = 0) function

Add justify(justification, row = 0) function

This allows (already printed) rows to be justified LEFT, RIGHT, or to the CENTER

before a call to show() by studying the existing mask for its maximum left

and right "extents".

Anything unable to be perfectly centered (odd length strings) will always bias left.

Usage:

print("TEST");

justify(CENTER); // Mask centered here

show();

// TODO: Add justify(justification, row = 0) function


//     print( "GREEN " );   
//     print( "color!" ); // Prints in green

// TODO: Add justify(justification, row = 0) function
// This allows (already printed) rows to be justified LEFT, RIGHT, or to the CENTER
// before a call to show() by studying the existing mask for its maximum left
// and right "extents".
// 
// Anything unable to be perfectly centered (odd length strings) will always bias left.
// 
// Usage:
//     print("TEST");
//     justify(CENTER); // Mask centered here
//     show();

/*! Modes for updating Pixie Chroma displays */
enum t_update_mode {
	AUTOMATIC, /*!< Will call show() at a specified FPS using an ISR */

46a7482a6f576156ea1070b407180f46b466c824

14_Icon_Library.ino needs content

14_Icon_Library.ino needs content

// TODO: 14_Icon_Library.ino needs content


// TODO: 14_Icon_Library.ino needs content

#include "Pixie_Chroma.h"
PixieChroma pix;

#define DATA_PIN	3
#define PIXIES_X	6
#define PIXIES_Y	2

void setup() {
  Serial.begin(250000);
  pix.begin(DATA_PIN, PIXIES_X, PIXIES_Y);
  delay(200);
}

void loop() {
  pix.clear();
}

aa2536b7096b0c8d93b927dad134292221c2f325

Call pix.show() from Ticker without need for wrapper function

Call pix.show() from Ticker without need for wrapper function

I'm currently unable to figure out how to feed a class function (non-static) like pix::show() to Ticker::attach_ms().


void show_container(){

extern PixieChroma pix;

pix.show();

}

// TODO: Call pix.show() from Ticker without need for wrapper function


#include "Pixie_Chroma.h" 
#include "utility/pixie_utility.h"

// TODO: Call pix.show() from Ticker without need for wrapper function 
// I'm currently unable to figure out how to feed a class function (non-static) like `pix::show()` to `Ticker::attach_ms()`.
// ```
// void show_container(){
//   extern PixieChroma pix;
//   pix.show();
// }
// ```

/*! ########################################################################
    @brief  Used for auto_update() so that Ticker can access this specific
            Pixie Chroma instance. Slightly hacky with the `extern`.

5e0a3b988efc2bd3ea80796b7c43b3f24184ed4a

Remove need for hardcoded "pix" extern in animation functions

Remove need for hardcoded "pix" extern in animation functions

// TODO: Remove need for hardcoded "pix" extern in animation functions


	// empty function with pix.set_animation(ANIMATION_NULL) to manually control color when you want
}

// TODO: Remove need for hardcoded "pix" extern in animation functions

void ANIMATION_STATIC(float delta){
	extern PixieChroma pix;


5dea0b5ec380789751c4ec4f6426fa5a12a1ce66

ISO C++ forbids converting a string constant to 'char*'

C:\Users\Cicero\Documents\Arduino\libraries\Pixie_Chroma\src\pixie_chroma_internal.cpp: In member function 'bool PixieChroma::unit_tests()':
C:\Users\Cicero\Documents\Arduino\libraries\Pixie_Chroma\src\pixie_chroma_internal.cpp:
3036:18: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
3036 | char* border = "+---------------------------------------------+";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Cicero\Documents\Arduino\libraries\Pixie_Chroma\src\pixie_chroma_internal.cpp:
3038:18: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
3038 | char* testing = "Testing: ";
| ^~~~~~~~~~~
C:\Users\Cicero\Documents\Arduino\libraries\Pixie_Chroma\src\pixie_chroma_internal.cpp:
3039:18: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
3039 | char* PASS = "PASS";
| ^~~~~~
C:\Users\Cicero\Documents\Arduino\libraries\Pixie_Chroma\src\pixie_chroma_internal.cpp:
3040:18: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
3040 | char* FAIL = "FAIL\n--------------------------------------------------------- #####";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Cicero\Documents\Arduino\libraries\Pixie_Chroma\src\pixie_chroma_internal.cpp:
3073:9: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
3073 | print("------------------------");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Cicero\Documents\Arduino\libraries\Pixie_Chroma\src\pixie_chroma_internal.cpp:3157:8:
warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
3157 | print("------------------------");

Add FastLED passthrough for FastLED.delay()

Whoops, forgot this one! FastLED.delay() delays execution while still rapidly refreshing the display, allowing things like pix.set_brightness() and pix.set_max_power() to continue functioning properly during a delay, unlike the standard delay() call, which will basically just NOP until the delay is complete.

Add set_print_color(CRGB) function

Add set_print_color(CRGB) function

This allows manual color to be automatically applied during subsequent print() calls.

Usage:

set_print_color( CRGB::Red );

print( "RED " );

print( "color!" ); // Prints in red

set_print_color( CRGB::Green );

print( "GREEN " );

print( "color!" ); // Prints in green

// TODO: Add set_print_color(CRGB) function



#include "Arduino.h"

// TODO: Add set_print_color(CRGB) function
// This allows manual color to be automatically applied during subsequent print() calls.
// 
// Usage:
//     set_print_color( CRGB::Red );
//     print( "RED " );   
//     print( "color!" ); // Prints in red
//     set_print_color( CRGB::Green );
//     print( "GREEN " );   
//     print( "color!" ); // Prints in green

/*! Modes for updating Pixie Chroma displays */
enum t_update_mode {
	AUTOMATIC, /*!< Will call show() at a specified FPS using an ISR */

3b61e34a32ea08175c3ef013e85d816c26e752c9

cannot compile sample code

I bought these from adafruit and am using the huzzah esp32 feather board and was following the tutorial here:
https://connornishijima.github.io/Pixie_Chroma/?section=getting-started

I installed the library (1.2.0) and then opened the sampled code:
Examples > Pixie_Chroma > 01_Basic > 01_Getting_Started

but when I try and compile it I get an error:
C:\Users\Jim\OneDrive\Documents\Arduino\libraries\Pixie_Chroma\src/Pixie_Chroma.h:74:138: fatal error: FastLED.h: No such file or directory

thanks

GUIDED_TOUR.ino needs content

GUIDED_TOUR.ino needs content

// TODO: GUIDED_TOUR.ino needs content


// TODO: GUIDED_TOUR.ino needs content

#include "Pixie_Chroma.h"
PixieChroma pix;

#define DATA_PIN	3
#define PIXIES_X	6
#define PIXIES_Y	2

void setup() {
  Serial.begin(250000);
  pix.begin(DATA_PIN, PIXIES_X, PIXIES_Y);
  delay(200);
}

void loop() {
  pix.clear();
}

1b80e2f4cd897effd47baae8688fac395c98b82a

Increase readability with spaced parameters

Increase readability with spaced parameters

I.e. print( value ); vs print(value);

// TODO: Increase readability with spaced parameters


 * Last Updated by Connor Nishijima on 10/20/21 
 */

// TODO: Increase readability with spaced parameters
//       I.e. `print( value );` vs `print(value);`

#ifndef pixie_chroma_h
#define pixie_chroma_h


bc60b6ae9d45d35fba27bb84b3c30e5ae1f9f9d3

Add Adafruit Neopixel library compatibility

Basic idea:

Provide compatibility with microcontrollers covered by the Adafruit Neopixel library, but not FastLED yet.

How:

  • If a platform unsupported by FastLED is detected, (i.e. RP2040) a compilation flag "ADAFRUIT_MODE" is defined.
  • A warning is shown during compilation that the library is in "Compatibility Mode" and performance may slightly suffer
  • FastLED.h is not included during compile. Instead, some manually curated FastLED module are included from a new file compatibility_tools.h
  • When a user specifies a FastLED detail like a CHSV color or a CRGBPalette16, these are handled by the FastLED structs and functions borrowed verbatim for the compatibility_tools.h file.
  • Upon calling pix.show(), the CRGB LED buffers are parsed into Neopixel's 32-bit color data using union for speed.
  • This converted LED array is then sent out using the underlying Neopixel library

This way, any microcontroller that the Neopixel library can work with (which FastLED can't yet) can be used in Compatibility Mode with little or no extra work by the user.

Make print() and write() calls allocate proper char array size

Make print() and write() calls allocate proper char array size

...for each variable type, instead of just 32 chars no matter the type.

// TODO: Make print() and write() calls allocate proper char array size


 * Last Updated by Connor Nishijima on 12/3/21
 */

// TODO: Make print() and write() calls allocate proper char array size
// ...for each variable type, instead of just 32 chars no matter the type.

#include "Pixie_Chroma.h" 
#include "utility/pixie_utility.h"


42da1807c79674e1230bf7893d46f9d8a6298f79

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.