• Stars
    star
    215
  • Rank 183,925 (Top 4 %)
  • Language
    JavaScript
  • License
    GNU General Publi...
  • Created almost 3 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An online tool to generate and visualize maps for irregular and/or gapped LED layouts, for use with FastLED, Pixelblaze and other libraries.

LED Mapper

Web App: https://jasoncoon.github.io/led-mapper

An online tool to generate and visualize maps for irregular and/or gapped LED layouts, for use with FastLED, Pixelblaze and other libraries.

Heavily inspired by the excellent FastLED XY Map Generator by Garrett Mace of Macetech which in turn was inspired by Mark Kriegsman.

The difference with this tool is that instead of generating coordinates for any "gaps", coordinates are only generated for each actual LED. So if you had an irregular/gapped matrix of 128 LEDs in a 16x16 grid, this tool would only create coordinate maps for 128 LEDs instead of 256. This usually results in lower memory usage, but also generates coordinate maps for radius and angle.

Using Google Sheets to create a layout:

google-sheets.mp4

Using LED Mapper to generate maps:

led-mapper.mp4

Here's an example of a serpentine matrix layout (it's deliberately irregular and asymmetrical):

	0	1	2	3	4	5	6		7	8	9	10	11	12	
28	27	26	25	24	23	22	21	20	19	18	17	16	15	14	13
29	30	31	32	33	34	35	36	37	38	39	40	41	42	43	44
59	58	57	56	55	54	53	52		51	50	49	48	47	46	45
	60	61	62	63	64	65				66	67	68	69	70	

And the generated FastLED coordinate maps:

#define NUM_LEDS 71

byte coordsX[NUM_LEDS] = { 17, 34, 51, 68, 85, 102, 119, 153, 170, 187, 204, 221, 238, 255, 238, 221, 204, 187, 170, 153, 136, 119, 102, 85, 68, 51, 34, 17, 0, 0, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255, 255, 238, 221, 204, 187, 170, 153, 119, 102, 85, 68, 51, 34, 17, 0, 17, 34, 51, 68, 85, 102, 170, 187, 204, 221, 238 };

byte coordsY[NUM_LEDS] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 };

byte angles[NUM_LEDS] = { 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128, 128, 128, 133, 134, 136, 137, 141, 146, 159, 191, 223, 236, 242, 245, 247, 248, 249, 250, 245, 244, 242, 240, 236, 231, 223, 210, 191, 172, 159, 151, 146, 143, 141, 139, 144, 146, 149, 154, 159, 167, 178, 204, 215, 223, 229, 233, 236, 239, 240, 234, 231, 228, 223, 217, 210, 172, 165, 159, 155, 151 };

byte radii[NUM_LEDS] = { 209, 179, 149, 119, 90, 60, 30, 30, 60, 90, 119, 149, 179, 211, 182, 152, 123, 94, 67, 42, 30, 42, 67, 94, 123, 152, 182, 211, 241, 246, 217, 189, 161, 133, 108, 84, 67, 60, 67, 84, 108, 133, 161, 189, 217, 227, 200, 174, 149, 127, 108, 94, 94, 108, 127, 149, 174, 200, 227, 255, 241, 215, 191, 169, 149, 133, 133, 149, 169, 191, 215 };

In addition to FastLED maps, a Pixelblaze 2D XY map is also generated:

[[1,0],[2,0],[3,0],[4,0],[5,0],[6,0],[7,0],[9,0],[10,0],[11,0],[12,0],[13,0],[14,0],[15,1],[14,1],[13,1],[12,1],[11,1],[10,1],[9,1],[8,1],[7,1],[6,1],[5,1],[4,1],[3,1],[2,1],[1,1],[0,1],[0,2],[1,2],[2,2],[3,2],[4,2],[5,2],[6,2],[7,2],[8,2],[9,2],[10,2],[11,2],[12,2],[13,2],[14,2],[15,2],[15,3],[14,3],[13,3],[12,3],[11,3],[10,3],[9,3],[7,3],[6,3],[5,3],[4,3],[3,3],[2,3],[1,3],[0,3],[1,4],[2,4],[3,4],[4,4],[5,4],[6,4],[10,4],[11,4],[12,4],[13,4],[14,4]]

With the generated maps, the following Arduino code can be used with the FastLED library.


All of the following examples assume the following structure:

uint8_t speed = 30; // beats per minute (BPM)

for (uint16_t i = 0; i < NUM_PIXELS; i++) {
  leds[i] = COLOR_FUNCTION;
}

FastLED.show();

For a horizontal rainbow:

  leds[i] = CHSV(coordsX[i]);

East Rainbow


To make it move/scroll:

  leds[i] = CHSV(beat8(speed) - coordsX[i]);

East Rainbow


To go the other direction horizontally:

  leds[i] = CHSV(beat8(speed) + coordsX[i]);

West Rainbow


Vertical:

  leds[i] = CHSV(beat8(speed) + coordsY[i]);

North Rainbow


Diagonal:

  leds[i] = CHSV(beat8(speed) + coordsX[i] + coordsY[i]);

Northeast Rainbow


Radius (expanding/contracting):

  leds[i] = CHSV(beat8(speed) + radii[i]);

Northeast Rainbow


Angle (rotating):

  leds[i] = CHSV(beat8(speed) + angles[i]);

Clockwise Rainbow

More Repositories

1

esp8266-fastled-webserver

C++
714
star
2

esp32-fastled-webserver

Work in progress ESP32 port of https://github.com/jasoncoon/esp8266-fastled-webserver
C
198
star
3

macrochips

A collection of laser engraved, 4 inch slate tile microchip coasters.
54
star
4

esp32-fastled-ble

Control addressable RGB LEDs via BLE using an ESP32 and FastLED
C
37
star
5

esp8266-fastled-audio

C++
35
star
6

SmartMatrix-FastLED-Examples

Examples of integration of Smartmatrix and FastLED
Arduino
14
star
7

BlinkyTileFastLED

BlinkyTile control using the FastLED library and an Arduino or Teensy
Arduino
14
star
8

SpectrumAnalyzerStrip

Spectrum analyzer using a Teensy 3.1 and an APA102 RGB LED strip.
Arduino
12
star
9

icosaLEDron

20-sided regular icosahedron made of PCBs with WS2812B-Mini 3535 RGB LEDs, LiPo battery, accelerometer, gyro, compass & other sensors.
C++
12
star
10

useless

Arduino controlled moody useless machine
Arduino
11
star
11

fibonacci64-touch-demo

Demo Arduino firmware for Fibonacci64 Micro v2 with touch pads
C
11
star
12

fastled-arcade

C
10
star
13

SmartMatrixLife

Conway's Game of Life on a SmartMatrix display using the FastLED library
Arduino
10
star
14

cyclohex-touch-demo

Demo Arduino firmware for CycloHex hexagonally-nested rings with 228 LEDs and six touch pads
C
8
star
15

fibonacci64-nano-touch-demo

C
7
star
16

SparkRing

SparkRing
JavaScript
6
star
17

fibonacci-demoreel

Fibonacci Demo Reel for any Arduino-compatible microcontroller.
C++
6
star
18

FastLED-Lessons

6
star
19

fibonacci64-circuitpython-demoreel

Fibonacci64 Demo Reel - CircuitPython, NeoPixel & FancyLED
Python
6
star
20

NoiseSmearing

NoiseSmearing, by Stefan Petrick, originally shared at: https://gist.github.com/StefanPetrick/9ee2f677dbff64e3ba7a
Arduino
6
star
21

LightAppliance

LightAppliance application for SmartMartix LED array
C++
5
star
22

FastLED-Photon-Blink-Example

C++
5
star
23

fibonacci

C++
5
star
24

APA102_Teensy_IR

C
4
star
25

demoreel100-buttons

C++
4
star
26

esp32-power-meter

ESP32 Power Meter
C++
4
star
27

SmartMatrixSpectrumAnalyzerBasic

Basic spectrum analyzer using Teensy Audio Library and SmartMatrix
Arduino
3
star
28

fibonacci128-touch-demo

C
3
star
29

ParticleCoreMatrixLamp

RGB LED matrix lamp using a Particle Core, FastLED, and 90 APA102C RGB LEDs.
Arduino
3
star
30

aurora-web-server-application

Web server application for controlling a SmartMatrix display running Aurora via the USB port.
HTML
3
star
31

fibonacci64-dial-prop

C++
3
star
32

fibonacci512-pixelblaze

A repository of patterns for the Fibonacci512 with Pixelblaze: https://www.evilgeniuslabs.org/fibonacci512-pixelblaze
JavaScript
3
star
33

Neosegment-FastLED-DemoReel100

Demo reel of a few patterns for Neosegment RGB seven-segment LED displays, using the FastLED library.
Arduino
3
star
34

ruler

SVG ruler generator
JavaScript
3
star
35

feather_ble_lamp_fastled

C
2
star
36

fibonacci182-card

Fibonacci 182 Card is a beautiful credit card sized rectangle with 182 RGB LEDs surface mounted in a Fibonacci distribution. Swirling and pulsing like a tiny galaxy, it's mesmerizing to watch.
C
2
star
37

fastled-jack-o-lantern

Arduino
2
star
38

releases

Upcoming releases.
HTML
2
star
39

fibonacci256-pixelblaze

A repository of patterns for the Fibonacci256 with Pixelblaze: https://www.evilgeniuslabs.org/fibonacci256-pixelblaze
JavaScript
2
star
40

fibonacci-pi

Fibonacci RGB LED disc driven by a Raspberry Pi
Python
2
star
41

RainbowSmoke

Arduino
1
star
42

SmartMatrixFadeCandyHtml

JavaScript
1
star
43

rgb-led-race-gate

C++
1
star
44

APA102-Strip

Arduino
1
star
45

f256-nunchuk-games

C
1
star
46

FastLED-Photon-IR-DemoReel

APA102 RGB LED strip driven with a Particle Photon, controlled via infrared remote control and/or web app over WiFi
C++
1
star
47

Fibonacci48x14mmDemo

Fibonacci48 x 14mm Demo Sketch
C
1
star
48

Teensy32x32MatrixSlideshow

Dynamically displaying bitmap images and animations on a 32x32 RGB LED Matrix using a Teensy v3.1, an SD card adaptor, and the SmartMatrix libraries by Pixelmatix.
Arduino
1
star