Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
727636d
Add PDPWOPR project. PDPCMX effect
davepl Aug 5, 2025
fad5ad6
Clean up project, fix S3 screen crash
davepl Aug 6, 2025
f6f2068
Fix non-working python script dependency
davepl Aug 6, 2025
ca412f6
Interim work on platformio.ini refactor
davepl Aug 6, 2025
06edf0e
Fix audio break
davepl Aug 6, 2025
e23d3c6
Fix audio issue with elecrow mesmerizer
davepl Aug 6, 2025
fb1fb79
Add libdeps, effects to mesmerizer
davepl Aug 7, 2025
8e0a5b4
Merge branch 'pdpwopr' of github.com:PlummersSoftwareLLC/NightDriverS…
davepl Aug 7, 2025
cc243da
Fix partition table for mesmerizer
davepl Aug 7, 2025
264f500
Build fixes
davepl Aug 7, 2025
9e3fa75
Make them all build
davepl Aug 7, 2025
05ae704
Before lib_deps
davepl Aug 7, 2025
6146dc9
Remove redundant libs
davepl Aug 7, 2025
a159aa3
Move MESMERIZER out of globals as a test
davepl Aug 7, 2025
44852e8
Migrate globals to platformio
davepl Aug 7, 2025
4d095d7
Fix feather_hexagon
davepl Aug 7, 2025
b88a4d9
Merge pull request #739 from PlummersSoftwareLLC/main
davepl Aug 7, 2025
1eb0425
Fix audio on mesmerizer
davepl Aug 8, 2025
c49b60e
Merge branch 'pdpwopr' of github.com:PlummersSoftwareLLC/NightDriverS…
davepl Aug 8, 2025
82728e9
Update soundanalyzer define
davepl Aug 8, 2025
ff4720c
Work around IDF version differences
davepl Aug 8, 2025
36aaa17
Fix missing endif
davepl Aug 8, 2025
76bf1ad
Fix (i2s_mode_t) issue
davepl Aug 8, 2025
7da880e
Remove project default
davepl Aug 8, 2025
9ec664a
Enable Audio in spectrum effects
davepl Aug 8, 2025
dcdd6f3
Enable audio in spectrum2
davepl Aug 8, 2025
3ed6077
New sound engine
Aug 9, 2025
32d5625
Revert to custom_effects.h overriding the effect flag
rbergen Aug 9, 2025
4cb1584
24 band plus cleanup
Aug 9, 2025
690b3be
Change data type to float
Aug 9, 2025
36f56c2
Add comments
Aug 9, 2025
c062423
Per-mic audio settings
Aug 10, 2025
6ecdfd4
Redo smoothing
Aug 10, 2025
fa44d8a
Merge branch 'audio' into pdpwopr
davepl Aug 11, 2025
53925b6
Merge pull request #741 from PlummersSoftwareLLC/pdpwopr
davepl Aug 11, 2025
e3746c9
Fix shadow of variable
Aug 11, 2025
e0e93f8
FrameGate
davepl Aug 11, 2025
c347cc9
Revert "FrameGate"
davepl Aug 11, 2025
d4183a6
Switch to cbrt() only
davepl Aug 11, 2025
6c565c5
Fix shadow of variables
davepl Aug 11, 2025
fba2150
Update comment
davepl Aug 11, 2025
4419a6c
Disable warning, set to 24ksamples
davepl Aug 11, 2025
25d55ff
Merge branch 'pdpwopr' into audio
davepl Aug 11, 2025
d98d838
Merge pull request #742 from PlummersSoftwareLLC/audio
davepl Aug 12, 2025
46cd909
Optimizations and audio gating
davepl Aug 12, 2025
927224e
Merge branch 'pdpwopr' into audioupdates
davepl Aug 12, 2025
5f35278
Update soundanalyzer.h
davepl Aug 12, 2025
5acad60
Use std algos
davepl Aug 12, 2025
d3f7b42
Merge branch 'audioupdates' of github.com:PlummersSoftwareLLC/NightDr…
davepl Aug 12, 2025
2936e8c
Fix build mess
davepl Aug 12, 2025
299afe7
Improve Clear()
davepl Aug 12, 2025
e6b0d17
Restore NUM_BANDS in no audio case
davepl Aug 12, 2025
86c88b7
fade optimizations
davepl Aug 13, 2025
e462b21
Merge pull request #744 from PlummersSoftwareLLC/audioupdates
davepl Aug 13, 2025
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
2 changes: 1 addition & 1 deletion include/effects.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
#define EFFECT_MATRIX_SILON 160
#define EFFECT_MATRIX_PDPGRID 161
#define EFFECT_MATRIX_AUDIOSPIKE 162

#define EFFECT_MATRIX_PDPCMX 163
// Hexagon Effects
#define EFFECT_HEXAGON_OUTER_RING 201

Expand Down
119 changes: 111 additions & 8 deletions include/effects/strip/misceffects.h
Original file line number Diff line number Diff line change
Expand Up @@ -576,22 +576,125 @@ class PDPGridEffect : public LEDStripEffect

virtual size_t DesiredFramesPerSecond() const
{
return 20;
return 5;
}

bool RequiresDoubleBuffering() const override
{
return false;
}

virtual void Start() override
{
g()->Clear();
}

virtual void Draw() override
{
fadeAllChannelsToBlackBy(255 * g_Values.AppTime.LastFrameTime());
fadeAllChannelsToBlackBy(60);
g()->MoveY(1);
for (int x = 0; x < MATRIX_WIDTH; x++)
{
// Pick a color, CRGB::Red 90% of the time, CRGB::Green 10% of the time
CRGB color = random(0, 100) > 20 ? CRGB::Black : CRGB(random(0, 100) < 90) ? CRGB::Red : CRGB::Orange;
setPixelOnAllChannels(x, MATRIX_HEIGHT-1, color);
}
}
};

// PDPCMXEffect
//
// Connection Machine 5 LED simulation for the PDP-11/34 CMX display

class PDPCMXEffect : public LEDStripEffect
{
private:
static constexpr int GROUP_HEIGHT = 5; // Height of each logical group
static constexpr float LED_PROBABILITY = 0.30f; // 30% chance of LED being on

void scrollGroup(int groupStartY, bool scrollLeft)
{
// Scroll existing LEDs in the group
for (int y = groupStartY; y < groupStartY + GROUP_HEIGHT && y < MATRIX_HEIGHT; y++)
{
if (scrollLeft)
{
// Scroll left: move all pixels one position left
for (int x = 0; x < MATRIX_WIDTH - 1; x++)
{
CRGB color = _GFX[0]->getPixel(x + 1, y);
setPixelOnAllChannels(x, y, color);
}
// Clear the rightmost pixel (will be populated with new random data)
setPixelOnAllChannels(MATRIX_WIDTH - 1, y, CRGB::Black);
}
else
{
// Scroll right: move all pixels one position right
for (int x = MATRIX_WIDTH - 1; x > 0; x--)
{
CRGB color = _GFX[0]->getPixel(x - 1, y);
setPixelOnAllChannels(x, y, color);
}
// Clear the leftmost pixel (will be populated with new random data)
setPixelOnAllChannels(0, y, CRGB::Black);
}
}

// Add new random LEDs on the appropriate edge
for (int y = groupStartY; y < groupStartY + GROUP_HEIGHT && y < MATRIX_HEIGHT; y++)
{
if (random(100) < (LED_PROBABILITY * 100))
{
CRGB color = CRGB::Red;
if (scrollLeft)
setPixelOnAllChannels(MATRIX_WIDTH - 1, y, color);
else
setPixelOnAllChannels(0, y, color);
}
}
}

public:

PDPCMXEffect() : LEDStripEffect(EFFECT_MATRIX_PDPCMX, "PDPCMXEffect")
{
}

PDPCMXEffect(const JsonObjectConst& jsonObject)
: LEDStripEffect(jsonObject)
{
}

virtual size_t DesiredFramesPerSecond() const
{
return 30; // Moderate speed for scrolling effect
}

virtual bool CanDisplayVUMeter() const override
{
return false;
}

virtual void Start() override
{
g()->Clear();
}

virtual void Draw() override
{
// Process each logical group
int numGroups = (MATRIX_HEIGHT + GROUP_HEIGHT - 1) / GROUP_HEIGHT; // Ceiling division

fadeAllChannelsToBlackBy(5);
EVERY_N_MILLISECONDS(200)
{
g()->MoveY(1);
for (int x = 0; x < MATRIX_WIDTH; x++)
for (int group = 0; group < numGroups; group++)
{
if (random(0, 100) < 20)
setPixelOnAllChannels(x, MATRIX_HEIGHT-1, CRGB::Red);
else
setPixelOnAllChannels(x, MATRIX_HEIGHT-1, CRGB::Black);
int groupStartY = group * GROUP_HEIGHT;
bool scrollLeft = (group % 2 == 0); // Alternate direction: even groups scroll left, odd scroll right

scrollGroup(groupStartY, scrollLeft);
}
}
}
Expand Down
12 changes: 9 additions & 3 deletions include/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,17 @@ extern RemoteDebug Debug; // Let everyone in the project know about it
#define PROJECT_NAME "M5Demo"
#endif

#define MATRIX_WIDTH 144*5+38
#define MATRIX_HEIGHT 1
#ifdef EFFECTS_PDPWOPR
#define MATRIX_WIDTH 16
#define MATRIX_HEIGHT 16
#else
#define MATRIX_WIDTH 144*5+38
#define MATRIX_HEIGHT 1
#endif

#define NUM_LEDS (MATRIX_WIDTH*MATRIX_HEIGHT)
#define NUM_CHANNELS 1
#define COLOR_ORDER EOrder::RGB
#define COLOR_ORDER EOrder::GRB

#define ENABLE_AUDIOSERIAL 0 // Report peaks at 2400baud on serial port for PETRock consumption
#define ENABLE_WIFI 1 // Connect to WiFi
Expand Down
6 changes: 6 additions & 0 deletions install_intelhex.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Import("env")

try:
import intelhex
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That might have been a transient bug.
platformio/platform-espressif32#1632

except ImportError:
env.Execute("$PYTHONEXE -m pip install intelhex")
Loading
Loading