Single Channel Works, Multi Channel doesn't.-solved #188
Replies: 9 comments 11 replies
-
You won’t power 42 LEDs off the regulator on a heltec32. Use a 5V power brick to power the strip, you should be fine.
… On Jan 3, 2023, at 2:26 PM, stretch911 ***@***.***> wrote:
i am still getting driver/adc_deprecated.h:14 errors, but thanks to some reading here, I've got (sorta) my heltec v2 working w/ a few effects. I can use DEMO just fine, (sorta depending on what effects i use). I want this code to work with 4 Channels for the Atom Fire Lamp. However, every time I up the Channel count from 1 to 2 or to 4, things stop working. Its almost like GPIO5 just dies...any help?
Not sure why either, some of the effects just blow up...i think...drawing too much power despite low brightness setting and limited power set. Example is new ColorFillEffect(CRGB::White, 1)...if i run ATOMLIGHT with single channel (becuase nothing works with more than one channel)..the 42 LEDS light up, then go red, then heltec pukes. Can't restart it until I pull those lit LEDs...very perplexing. Help? I'm pretty solid with all this stuff. I think its environmental. Admittedly I'm very new to platformio as I've used the arduino ide exclusively for microcontrollers until last week. thanks in advance
Here are my globals for DEMO:
#define MATRIX_WIDTH 42
#define MATRIX_HEIGHT 1
#define NUM_LEDS (MATRIX_WIDTH*MATRIX_HEIGHT)
#define NUM_CHANNELS 1
// #define NUM_RINGS 5
// #define RING_SIZE_0 24
#define ENABLE_AUDIO 1
#define POWER_LIMIT_MW 12 * 10 * 1000 // 10 amp supply at 5 volts assumed
#define DEFAULT_EFFECT_INTERVAL (1000*60*1)
// Once you have a working project, selectively enable various additional features by setting
// them to 1 in the list below. This DEMO config assumes no audio (mic), or screen, etc.
#define ENABLE_WIFI 0 // Connect to WiFi
#define INCOMING_WIFI_ENABLED 0 // Accepting incoming color data and commands
#define TIME_BEFORE_LOCAL 0 // How many seconds before the lamp times out and shows local content
#define ENABLE_NTP 0 // Set the clock from the web
#define ENABLE_OTA 0 // Accept over the air flash updates
// #if M5STICKC || M5STICKCPLUS
// #define LED_PIN0 32
// #else
// #define LED_PIN0 5
// #define LED_PIN1 18
// #endif
#define LED_PIN0 5
// #define LED_PIN1 18
// #define LED_PIN2 19
// #define LED_PIN3 17
—
Reply to this email directly, view it on GitHub <#188>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA4HCF23J72AUNO4SMH425TWQSRQBANCNFSM6AAAAAATQEWMF4>.
You are receiving this because you are subscribed to this thread.
|
Beta Was this translation helpful? Give feedback.
-
Do you have the grounds connected? You must connected the negative power leg to the negative side of the LED circuit.
… On Jan 3, 2023, at 7:14 PM, stretch911 ***@***.***> wrote:
if i power the strip separate and apart from the heltec (no shared + or -) the leds go hay wire...see other post. thanks for reply. i'm trying it now, however, it seems like both 5 and 17 (running two 42s off 5v power brick like you said) don't work. if i share the datapin on 5 and run single channel it works.
—
Reply to this email directly, view it on GitHub <#188 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA4HCFYNYUDS5G2CVSKPLVLWQTTIHANCNFSM6AAAAAATQEWMF4>.
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
-
looks like setup sets up PIN0 and PIN1 as output... |
Beta Was this translation helpful? Give feedback.
-
Try fixing that so that the first (default) one is LED_PIN0 and the second one is LED_PIN1 and then LED_PIN2 and so on. That’s a bug.
From: stretch911 ***@***.***>
Sent: Wednesday, January 4, 2023 4:11 PM
To: PlummersSoftwareLLC/NightDriverStrip ***@***.***>
Cc: David W Plummer ***@***.***>; Comment ***@***.***>
Subject: Re: [PlummersSoftwareLLC/NightDriverStrip] Single Channel Works, Multi Channel doesn't. (Discussion #188)
#if NUM_CHANNELS == 1
debugI("Adding %d LEDs to FastLED.", g_pDevices[0]->GetLEDCount());
FastLED.addLeds<WS2812B, LED_PIN0, COLOR_ORDER>(((LEDStripGFX *)g_pDevices[0].get())->leds, 3*144);
FastLED[0].setLeds(((LEDStripGFX *)g_pDevices[0].get())->leds, g_pDevices[0]->GetLEDCount());
FastLED.setMaxRefreshRate(0, false); // turn OFF the refresh rate constraint
pinMode(LED_PIN0, OUTPUT);
#endif
this is curious...why is if num_channels ==1 (which works for me) have all this initialization setup contained in the THEN do stuff portion...
when i set my numChannel = 2, it SKIPS this and i just get...
#if NUM_CHANNELS >= 2
FastLED.addLeds<WS2812B, LED_PIN0, COLOR_ORDER>(((LEDStripGFX *)g_pDevices[0].get())->leds, ((LEDStripGFX *)g_pDevices[0].get())->GetLEDCount());
pinMode(LED_PIN0, OUTPUT);
FastLED.addLeds<WS2812B, LED_PIN1, COLOR_ORDER>(g_pDevices[1]->leds, g_pDevices[1]->GetLEDCount());
pinMode(LED_PIN1, OUTPUT);
#endif
seems odd...when all the other patterns in this If after If after If seems to build upon one another.... >=2 doesn't do what ==1 does..
—
Reply to this email directly, view it on GitHub <#188 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA4HCFZSZ5B3F6XGP4IJS2DWQYGPRANCNFSM6AAAAAATQEWMF4> .
You are receiving this because you commented. <https://github.com/notifications/beacon/AA4HCF7MY7BEI6JCZW26WKLWQYGPRA5CNFSM6AAAAAATQEWMF6WGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAIYRZM.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
Saga Continued.... After trying about every combination of the above tinkering w/ #if USESTRIP section in main.cpp, I woke this morning and tried this...
So basically, when NUM_CHANNELS =1 in globals.h (DEMO), PIN5 works. Now...When I set NUM_CHANNELS = 2, my debug statement prints the correct info....and EVEN WITH THE CODE COMMENTED, PIN5 and PIN17 DON"T!...VERY ODD>....what happens when NUM_CHANNELS = 2 that makes BOTH pins not work. HELP????!!!!! |
Beta Was this translation helpful? Give feedback.
-
Continued....
|
Beta Was this translation helpful? Give feedback.
-
Problem Solved... [env:heltecv2demo] ; V2 board has 8M flash this was my first taste of success...so just stuck with it....got to thinking...what if i don't have a v2? so....tried, ledstrip for the env, but used com9 for upload and build_flags = -DLEDSTRIP (platformio.ini) (globals.h)
whew! just in time. my replacement ws2812 144 2 meters arrive today and i want to get this lamp running!!!!! Hope this helps someone else out. |
Beta Was this translation helpful? Give feedback.
-
added all those effects i'd been working on in DEMO section in effect.cpp (that were working) and then the build blew up. c:/users/sever/.platformio/packages/[email protected]+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio/build/ledstrip/src/effects.cpp.o:(.literal._ZN13FireFanEffect8DrawFireE10PixelOrder[_ZN13FireFanEffect8DrawFireE10PixelOrder]+0x18): undefined reference to `gVURatio' .... I then tried env:heltecdemo and that built but nothing is working... :( .... so i switched env:heltecdemo to use build flag : build_flags = -DLEDSTRIP=1, again, got the gVURatio error. I had pasted all my effects into LEDSTRIP in effect.cpp, so just commented out all of them (that were working...hmm)...back in action w/ single effect. now i have to go thru each effect to find out the culprit....stay tuned :) #elif LEDSTRIP
... enabling each effect one at a time got old pretty quick, so i think that gVURatio error is related to "sound driven effect". Comparing the two Environments in global.h, DEMO had ENABLE_AUDIO set to 1. LEDSTRIP had ENABLE_AUDIO set to 0. Although I'm not using audio (yet), this apparently loads a library that the compiler detects an effect I was using needed....so....skipping the one by one approach, i just set ENABLE_AUDIO to 1, uncommented out all my above effects and BAM!!!! Two channels, rocking these cool effects!!!!!!!!!!!! i lied....something caused the heltec to reset...curses. ...think it was wifi, i disabled ENABLE_WIFI, INCOMING_WIFI_ENABLED, WAIT_FOR_WIFI, and TIME_BEFORE_LOCAL to zero and i'm on effect number 3 now...both channels (pin5 and 17 working) Some effects don't work on 2 channels? new StarryNightEffect("Rainbow Twinkle Stars", RainbowColors_p, STARRYNIGHT_PROBABILITY, 1, LINEARBLEND, 2.0, 0.0, STARRYNIGHT_MUSICFACTOR), |
Beta Was this translation helpful? Give feedback.
-
I can’t say for sure, but once you’ve given the pin to FastLED I’m not sure you can still manually blink the LED (never tried) but perhaps not. It really should not matter if no one has called FastLED.show yet
I would try the two code blocks separate. Change it to
#if NUM_CHANNELS == 1
and
#if NUM_CHANNELS == 2
Then try each case to make sure each works separately. I would use PIN5 and PIN2, not sure if 17 works. I for sure won’t on a WROVER, I know that.
- Dave
… On Jan 6, 2023, at 4:51 AM, stretc
h911 ***@***.***> wrote:
Continued....
I added a digitalWrite HIGH and LOW with delay in the channel1 setup and channel2. when NUM_CHANNELS=1, the LED Strip on PIN5 blinks. when NUM_CHANNELS=2 neither pin5 nor pin17 blinks...
#if NUM_CHANNELS >= 1
debugI("Adding %d LEDs to FastLED.", g_pDevices[0]->GetLEDCount());
debugI("Number of Channels : %d", NUM_CHANNELS);
FastLED.addLeds<WS2812B, LED_PIN0, COLOR_ORDER>(((LEDStripGFX *)g_pDevices[0].get())->leds, g_pDevices[0]->GetLEDCount());
FastLED[0].setLeds(((LEDStripGFX *)g_pDevices[0].get())->leds, g_pDevices[0]->GetLEDCount());
FastLED.setMaxRefreshRate(0, false); // turn OFF the refresh rate constraint
pinMode(LED_PIN0, OUTPUT);
digitalWrite(LED_PIN0, HIGH);
delay(1000);
digitalWrite(LED_PIN0, LOW);
#endif
#if NUM_CHANNELS >= 2
debugI("Adding %d LEDs to FastLED Channel 2.", g_pDevices[1]->GetLEDCount());
// // FastLED.addLeds<WS2812B, LED_PIN0, COLOR_ORDER>(((LEDStripGFX *)g_pDevices[0].get())->leds, ((LEDStripGFX *)g_pDevices[0].get())->GetLEDCount());
// // pinMode(LED_PIN0, OUTPUT);
FastLED.addLeds<WS2812B, LED_PIN1, COLOR_ORDER>(((LEDStripGFX *)g_pDevices[1].get())->leds, ((LEDStripGFX *)g_pDevices[1].get())->GetLEDCount());
FastLED[1].setLeds(((LEDStripGFX *)g_pDevices[1].get())->leds, g_pDevices[1]->GetLEDCount());
FastLED.setMaxRefreshRate(0, false);
pinMode(LED_PIN1, OUTPUT);
digitalWrite(LED_PIN1, HIGH);
delay(1000);
digitalWrite(LED_PIN1, LOW);
#endif
—
Reply to this email directly, view it on GitHub <#188 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA4HCF2PB2YYOBUE6THDL6DWRAILNANCNFSM6AAAAAATQEWMF4>.
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
i am still getting driver/adc_deprecated.h:14 errors, but thanks to some reading here, I've got (sorta) my heltec v2 working w/ a few effects. I can use DEMO just fine, (sorta depending on what effects i use). I want this code to work with 4 Channels for the Atom Fire Lamp. However, every time I up the Channel count from 1 to 2 or to 4, things stop working. Its almost like GPIO5 just dies...any help?
Not sure why either, some of the effects just blow up...i think...drawing too much power despite low brightness setting and limited power set. Example is new ColorFillEffect(CRGB::White, 1)...if i run ATOMLIGHT with single channel (becuase nothing works with more than one channel)..the 42 LEDS light up, then go red, then heltec pukes. Can't restart it until I pull those lit LEDs...very perplexing. Help? I'm pretty solid with all this stuff. I think its environmental. Admittedly I'm very new to platformio as I've used the arduino ide exclusively for microcontrollers until last week. thanks in advance
Here are my globals for DEMO:
#define MATRIX_WIDTH 42
#define MATRIX_HEIGHT 1
#define NUM_LEDS (MATRIX_WIDTH*MATRIX_HEIGHT)
#define NUM_CHANNELS 1
// #define NUM_RINGS 5
// #define RING_SIZE_0 24
#define ENABLE_AUDIO 1
#define POWER_LIMIT_MW 12 * 10 * 1000 // 10 amp supply at 5 volts assumed
Beta Was this translation helpful? Give feedback.
All reactions