Laserline for LilyGo T-Display S3 #427
Replies: 5 comments 17 replies
-
Welcome, @SeanMcKeen. All the pieces SHOULD be there. I think I just laid out the plans at #428 I don't know much about laserline (if you do, please submit a PR adding it to the comment block at the top of platform.ini and maybe README.md - maybe we need another section there for UMBRELLA, LANTERN and other things that are effects combinations layered atop DEMO. but I think you'll need a few changes. platformio.ini probably needs a new block that's something like: ; LILYGO T-Display-S3 Laserline Now if this (or something like this) works, please submit a PR to enable it for the next person. If it doesn't work, we'll figure it out. The power of determined people willing to hit-and-miss something should never be underestimated! I don't have that exact board, but I have ones that are pretty similar. Using the map I (tried to) lay out in #428, I see in src/effects.cpp that the -DLASERLINE builds an effects table of exactly one effect, that it's a strip effect (so I assume I can replicate it with some set of the bazillion 2811/2812's i have) and that the arguments passed to the constructor are 500 and 20. So looking in include/effects/strip/laserline.h we see it "Sound reactive laser "shot" that travels down a strip" (ah, yes, I think I have seen some videos on this; it also served as a lesson on voltage sag...) so it'll be built with speed of 500 and a size of 20. Sounds reasonable. This information is totally contradictory to the #elif LASERLINE case in include/globals.h, so also as part of your initial It catches my eye that this effect is setting the LED pin Now if your board has GPIO pin 32 available, there's no real shame in just attaching your strip of 700 (MATRIX_WIDTH) LEDs there and rolling with it. HOwever, looking at https://www.lilygo.cc/products/t-display-s3 - it seems highly unlikely that it's on 32. So is this a valid, tested, working combination that someone submitted or is it copy-pasted from other config that's never actually worked? I can't see it on https://github.com/Xinyuan-LilyGO/T-Display-S3-AMOLED/blob/main/schematic/T-DISPLAY-S3-AMOLED.pdf. So finding an appropriate GPIO pin is up to you. Not knowing the board, I'd start researching in the pink block of 16-43 in the upper right. The .ini file says that the buttons (onboard buttons? Buttons you wire up?) should be on GPIO pins 37 and 39, but there's nothing in laserline.h that sets event handlers for buttons. Unless you know that laserline has/needs/uses buttons, please just delete those lines in that hunk. The following two lines for NUM_INFO_PAGES and ONSCREEN_SPECTRUM_PAGE seem like they should depend on what you're building ON (LILYGOTDISPLAYS3) and not what effect you're building. Since we're turning off USE_SCREEN above (at least for now) that has no chance of working in this configuration. I'm unconvinced so far they work on any hardware for this effect, but they're probably harmless for now. Wait, the schematic shows you DO have two buttons: one on GPIO0 (after boot) and one on GPIO21. But LAsERLINE doesn't seem to use buttons, so let's keep ignoring them for now. You said you're not experienced, so I'll over-explain this since it's a bit more than copy-paste. This means "if it's not set elsewhere, use PIN0 (the default pin we put blinkies on) to 32. That'll let it keep working for whomever wrote this. Now tweak your newly created entry in platform.io to include This moves the hardware defines into the places that are choosing hardware-specific things and keeps it out of the pattern-specific stuff. It'll keep working the same for everyone not using your new board. Now, however, we've now declared "For T-Display S3, the first blinky pin shall be 321". If there's anything ELSE that builds for T-display-s3, and it strongly insists on #define LED_PIN0 something-else, the choice is to add a similar #ifndef bracket around the code that's about to start whining OR just accept their choice of LED_PIN0 and move your wire from 321 to whatever THEY chose. It's all a bit of a dance in this project, I'm afraid. Having an active developer in this project with this board will help defend others from breaking it, so welcome to your new role as T-D S3 maintainer, unless it's already filled. :-) Now for the bonus round: the question you didn't ask! Obviously, a major effect of that board is the display. Nothing in this configuration tries to turn it on. There are a couple of different boards from LilyGo with that approximate name. (AMOLED? "old and new" LCD, etc.) Depending on the exact board you have, this might get a bit involved. The good news is that there are other projects (Adafruit Feather, Panlee) that run similar displays (7796, 7789) all through the excellent Bodmer TFT library. The TTGO board links with https://github.com/Xinyuan-LilyGO/TTGO-T-Display, but I can't tell if that works with your board or not. Those boards all seem to use SPI to talk to the board, but the schematics looks like it's using parallel, so we'd have to define all the pins individually and then tell Bodmer TFT how to hook to it. You can look in platformio.ini for ledstrip_feather and see the USE_SCREEN through SPI_FREQUENCY or so to see the approximate type of configuration we may have to set up. For env:panlee see USE_SCREEN through SMOOTH_FONT for inspiration. If the setup really is parallel instead of SPI, we'll have to define all the data bits, select, clock, and such. It's just drudgery to work through it all. I'm sure it's possible. Depending upon your experience level and determination, it could range between easy and frustrating. Just this weekend, I discovered I have a similar ESP32-S3 board that has an integrated 7789 and LCD, so it's possible that in upcoming weeks, I'll refine my own expertise in this general area. It's likely to be as annoyingly different to your boards as the existing boards are to yours. I'm not really sure how much is to be gained by setting it all up. I haven't seen screenshots of those devices while running NightDriverLED or given src/screen.cpp much more than a skim. Mirroring the Mesmerizer display would be cool, but I can't ttell that the code is even trying to do that offhand. Let's get your strip blinking first. Give that a try and see if we can get there and THEN decide if the LCD thing isimportant to you. |
Beta Was this translation helpful? Give feedback.
-
I think I can contribute, what is hopefully, clarifications on some of @robertlipe comments above. LASERLINE should work with a WS2812 strip as long as 1000, the caveat is having enough 5v power injected at the beginning and end of the strip to drive a strip that long. A strip of 700 long is more power conserving and is how my copy of NightDriverStrip code is setup for. But, as @davepl mentions in his YT Laser Cannon video, you can use any strip length you want because shorter length strips the serial data sent down the strip that doesn't have a "receiving" RGB LED just falls off into the void of time. The LASERLINE code runs fine with my unique WS2812B strip configuration that has only 84 LEDs with no code adjustment. The only thing that I noticed is that the serial data stream time needed for 700 LEDs in the strip results in an audio delay "dead spot" that occurs until a new serial data stream can be transmitted in reaction to a new audio trigger. My first "tweak" of the LASERLINE code is to shorten the NUM_LEDS to 84 which is my modest project LED length. I'll stay away from any comments on LCD matrix display challenges as I'm a newbie to this but have a general understanding of writing to pixels. I'll be happy to help @SeanMcKeen with his lilygo board (is it the T-display S3?) getting LASERLINE working. As @robertlipe said, getting the GPIO pin variable set right as well as your ESP32 board type. |
Beta Was this translation helpful? Give feedback.
-
Tonight I got "demo" to work with my M5StickC Plus, 84 LED strip. (yea!) |
Beta Was this translation helpful? Give feedback.
-
You're overcomplicating things. Attach it, set the #define for
IR_REMOTE_PIN to 28, rebuild, reflash, and go.
When the RX pin sees a valid key press, it should hit the debug print at
the top
debugV("Received IR Remote Code: 0x%08X, Decode: %08X\n", result,
results.decode_type);
You'll get 8 digit numbers. When they match the codes in
include/remotecontrol.h, it'll do the things.
In my tree, it's more selective about letting globals.h pick up the include
for rc.h so I don't have to rebuild the entire project when I change rc.h.
But that falls into the "if you see code that works, but isn't the way you
like it, leave it alone" rule, so I've not submitted fixes for that...
…On Mon, Sep 18, 2023 at 10:25 PM aldengaw ***@***.***> wrote:
I found my 1838 IR receiver which works from 2.7 to 5.5v, so 3.3v is the
sweet spot. Connecting it will be easy for 3.3v operation on the M5StickC
Plus. I'll probably go with GPIO 26 on the 8-pin header.
I looked at an Uno IR.h library and see better how their outputs button
values are defined, read and interpreted. Now I'm looking at the
remotecontrol.cpp file.
Thanks again for the pointers.
—
Reply to this email directly, view it on GitHub
<#427 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCSD32KKTNL7LXTWEYHLPTX3EGBLANCNFSM6AAAAAA4WR2EAE>
.
You are receiving this because you were mentioned.Message ID:
<PlummersSoftwareLLC/NightDriverStrip/repo-discussions/427/comments/7041228
@github.com>
|
Beta Was this translation helpful? Give feedback.
-
LOL that a 25 y/o arduino remote works on your TV. I TOLD you these were
pretty universal things.
Big Hammer. Let's get you something that works and forget about
integration. Just go to the end (where the per-project fan out that I
described a couple of times starts to fan in again).
https://github.com/PlummersSoftwareLLC/NightDriverStrip/blob/17f4d45774be6334f2a95ece5351566e65c08e09/include/globals.h#L1419
#undef IR_REMOTE_PIN (in case it was defined somewhere in that huge mess
above it)
#undef ENABLE_REMOTE
#define IR_REMOTE_PIN whatever
#define ENABLE_REMOTE 1
I think DEMO and LASER each have only one
<https://github.com/PlummersSoftwareLLC/NightDriverStrip/blob/17f4d45774be6334f2a95ece5351566e65c08e09/src/effects.cpp#L333>
effect, so it's going to be hard to see much benefit from the remote there.
You're going to have to decide what you want it to do from the options in
effects.cpp and remotecontrol.cpp - this will be a bit of a "choose your
own adventure" exercise. Find the pin your SOC can receive signals from
your diode receiver. Find codes your remote sends. Find (or make)
something that the NightDriverLED does that responds to those codes and
connect them in remote*cpp. You'll see the debug prints on every key press.
Skimming it,
https://www.circuitbasics.com/arduino-ir-remote-receiver-tutorial/ or
https://myenterprised.com/mods/model-remodel/arduino/remote-control/ won't
QUITE work, but seem to hit the needed education points. They show the kind
of codes you'll be looking for - maybe the exact matching codes.
I can't help you with Windows amnesia. Sorry. Like the antivirus thing
earlier today, that's just the price you pay.
…On Tue, Sep 19, 2023 at 12:54 AM aldengaw ***@***.***> wrote:
Sorry, I simply do not know where to add #define IR_REMOTE_PIN 26 or
#define ENABLE_REMOTE 1.
So my attempt to add it under #if DEMO in globals.h didn't compile at
first. frustrating
I alternately get upload errors 'couldn't open COM8, it doesn't exist',
when just earlier it compiled and uploaded just fine.
If I leave leave upload_port undefined in the .ini file when compliling
'laserline" it usually finds COM8 and uploads to it.
However, half the time when I try to compile "demo" it couldn't open COM8
unless I manually specify it, and even then it sometimes says it couldn't
open COM8 which of course in my M5StickC Plus.
So now it compiled with "demo" no errors but no remote either. But my TVs
turn on with this Elegoo 21 button remote. I don't even know how to
identify this remote other than it has Elegoo stamped on it.
I will persevere though...eventually.
—
Reply to this email directly, view it on GitHub
<#427 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCSD37F2L3AEPZO2OSGQT3X3EXPVANCNFSM6AAAAAA4WR2EAE>
.
You are receiving this because you were mentioned.Message ID:
<PlummersSoftwareLLC/NightDriverStrip/repo-discussions/427/comments/7041932
@github.com>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Been trying this for a while, the laserline env doesn't seem to be compatible with the lilygo, obviously, since its made for m5. I'm wondering if anyone has made a working version of laserline for the lilygo? I'm not very experienced with this sort of thing and its hard to find instructions on how to do this. Help would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions