Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object Oriented Library #22

Open
wants to merge 35 commits into
base: AnimARTrix_SmartMatrix
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
6b8ccda
Initial rough first pass at flipping ANIMartRIX to OO library
netmindz May 17, 2023
23fdfe6
Add ANIMartRIX_FastLED
netmindz May 17, 2023
424e4ba
First working draft of code as library
netmindz May 17, 2023
ce83173
Allow delaying step to init rather than constructor only
netmindz May 17, 2023
2ff51b5
Tweak polar_theta and distance to more sane values for now
netmindz May 23, 2023
f4089cb
Add setBuffer
netmindz May 23, 2023
5d7a7f1
Remove CRGB from ANIMartRIX, making abstract class where setPixelColo…
netmindz May 29, 2023
d7c1896
Replace fixed size polar array with dynamic vectors
netmindz May 29, 2023
b1d35b8
Include <vector>
netmindz May 29, 2023
647ca37
Call method of object
netmindz May 29, 2023
0d9fe36
Update ANIMartRIX_SmartMatrix.ino
netmindz May 30, 2023
3eeb426
Merge branch 'OO' of github.com:netmindz/animartrix into OO
netmindz Jun 29, 2023
65bcfc5
Add setSpeedFactor
netmindz Jun 29, 2023
af1e52b
Remove magic values for 31
netmindz Jun 29, 2023
baa6802
make radial_filter_radius runtime value
netmindz Jun 29, 2023
f070fef
make radial_filter_radius runtime value
netmindz Jun 29, 2023
c7524bd
Add ANIMartRIX_FastLED_TeensyDMX example
netmindz Jul 3, 2023
2a29525
Untested attempt at selection of pattern via DMX
netmindz Jul 3, 2023
baf11d5
Add playlist example
netmindz Jul 3, 2023
dcd76d2
Add playlist example - enable more patterns
netmindz Jul 3, 2023
679b903
Fix performance logging
netmindz Jul 3, 2023
b41f04f
Add ANIMartRIX_SmartMatrix_TeensyDMX
netmindz Jul 3, 2023
8fd0df3
Always set all 3 values for rgb pixel data
netmindz Oct 17, 2023
eaa27af
Update ANIMartRIX.h
netmindz Oct 21, 2023
18bf173
Update ANIMartRIX.h
netmindz Oct 21, 2023
091c6b4
Update ANIMartRIX.h
netmindz Mar 17, 2024
b93e6d5
Update README.md
netmindz Nov 23, 2024
c06a893
Set default timings.master_speed
netmindz Nov 23, 2024
482854b
Fix negative colour values
netmindz Nov 23, 2024
955250b
Slow down SM8
netmindz Nov 23, 2024
3a37ff8
Fix redundant calling of calculate_oscillators
netmindz Nov 23, 2024
83e6989
More sane speed values for Scaledemo1
netmindz Nov 23, 2024
ccb11dd
More sane speed for Hot_Blob
netmindz Nov 23, 2024
bb1f468
Merge branch 'OO' into speed-bugfixes
netmindz Nov 23, 2024
b172586
Merge pull request #1 from netmindz/speed-bugfixes
netmindz Nov 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
712 changes: 590 additions & 122 deletions animation_collection.ino → ANIMartRIX.h

Large diffs are not rendered by default.

183 changes: 0 additions & 183 deletions AnimARTrix_SmartMatrix.ino

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# AnimARTrix

by Stefan Petrick 2023.
by Stefan Petrick 2023.
Object Oriented port by Will Tatam

High quality LED animations for your next project.

Expand Down
105 changes: 105 additions & 0 deletions examples/ANIMartRIX_FastLED/ANIMartRIX_FastLED.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/*
___ _ ___ ______ _____ _
/ _ \ (_) / _ \ | ___ \_ _| (_)
/ /_\ \_ __ _ _ __ ___ / /_\ \| |_/ / | |_ __ ___ __
| _ | '_ \| | '_ ` _ \| _ || / | | '__| \ \/ /
| | | | | | | | | | | | | | | || |\ \ | | | | |> <
\_| |_/_| |_|_|_| |_| |_\_| |_/\_| \_| \_/_| |_/_/\_\

by Stefan Petrick 2023.

High quality LED animations for your next project.

This is a Shader and 5D Coordinate Mapper made for realtime
rendering of generative animations & artistic dynamic visuals.

This is also a modular animation synthesizer with waveform
generators, oscillators, filters, modulators, noise generators,
compressors... and much more.

VO.42 beta version

This code is licenced under a Creative Commons Attribution
License CC BY-NC 3.0

*/

#include <FastLED.h>
#include <ANIMartRIX.h>

#define num_x 30 // how many LEDs are in one row?
#define num_y 30 // how many rows?

#define NUM_LED (num_x * num_y)
CRGB leds[NUM_LED]; // framebuffer

bool serpentine = true;

class FastLEDANIMartRIX : public ANIMartRIX {
CRGB* leds;
public:
FastLEDANIMartRIX(int x, int y, CRGB* leds, bool serpentine) {
this->init(x, y, serpentine);
this->leds = leds;
}
void setPixelColor(int x, int y, rgb pixel) {
leds[xy(x,y)] = CRGB(pixel.red, pixel.green, pixel.blue);
}
void setPixelColor(int index, rgb pixel) {
leds[index] = CRGB(pixel.red, pixel.green, pixel.blue);
}
};
FastLEDANIMartRIX animatrix(num_x, num_y, leds, serpentine);

//******************************************************************************************************************


void setup() {

// FastLED.addLeds<NEOPIXEL, 13>(leds, NUM_LED);

FastLED.addLeds<APA102, 7, 14, BGR, DATA_RATE_MHZ(8)>(leds, NUM_LED);

FastLED.setMaxPowerInVoltsAndMilliamps( 5, 2000); // optional current limiting [5V, 2000mA]

Serial.begin(115200); // check serial monitor for current fps count

// fill_rainbow(leds, NUM_LED, 0);
fill_solid(leds, NUM_LED, CRGB::Green);
FastLED.show();
}

//*******************************************************************************************************************

void loop() {
//FastLED.clear();
// art.RGB_Blobs5();
// art.RGB_Blobs4();
// art.RGB_Blobs3();
// art.RGB_Blobs2();
animatrix.RGB_Blobs();
// art.Polar_Waves();
// art.Slow_Fade();
// art.Zoom2();
// art.Zoom();
// art.Hot_Blob();
// art.Spiralus2();
// art.Spiralus();
// art.Yves();
// art.Scaledemo1();
// art. art.Lava1();
// art.Caleido3();
// art.Caleido2();
// art.Caleido1();
// art.Distance_Experiment();
// art.Center_Field();
// art.Waves();
// art.Chasing_Spirals();
// art.Rotating_Blob();
// art.Rings();
animatrix.logOutput();
FastLED.show();
animatrix.logFrame();
EVERY_N_MILLIS(500) animatrix.report_performance(); // check serial monitor for report
}

Loading