Skip to content

A simple simulator for FastLED/Adafruit-GFX Sketches based on SDL

Notifications You must be signed in to change notification settings

benpicco/FastLEDonPc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastLED on PC

What?

With this software you can run an Arduino Sketch on your PC. In particular, you can run FastLED sketches with Adafruit-GFX.

It is made for Linux using SDL.

Hello World!

Why?

It takes three weeks to ship a serial LED strip from China, but I want to start coding animations now!

HowTo

If you are using Arduino Make, it should be sufficient to replace the Arduino.mk include with makeNativeArduino.mk in your Makefile. Then simply run make as usual.

See the example/ directory for an example.

This uses a patched version of FastLED which outputs to a SDL buffer instead of real hardware.

To use it, replace your usual FastLED.addLeds<WS2812B, DATA_PIN>(leds, num_leds); with

FastLED.addLeds<SDL, width, height>(leds, num_leds);

The Layout for NeoMatrix is NEO_MATRIX_TOP + NEO_MATRIX_LEFT + NEO_MATRIX_ROWS (no ZIGZAG as you would want on real hardware)

If things appear too dark, use the + key to increase brightness.

Installation

SDL is used to render a simulation of the LED-Strip Matrix. To install the required dependencies, run

sudo apt install libsdl2-dev

The project uses git submodules to include the Arduino libraries. To get them, you have to run

git submodule init
git submodule update

after checking out the repository.

About

A simple simulator for FastLED/Adafruit-GFX Sketches based on SDL

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 82.3%
  • C 16.4%
  • Makefile 1.3%