Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!




LED Effects - Star ...
 
Share:
Notifications
Clear all

LED Effects - Star Trek Phaser Array

207 Posts
13 Users
33 Likes
26.3 K Views
 Anonymous
Joined: 53 years ago
Posts: 0
 

  Hello,

   I'm not sure how active this topic is, but I came across it while searching for a solution to a slightly different Star Trek-related project.  Instead of modelling the phaser banks or warp nacelles, I've been modelling the WARP CORE following the wonderful project documented by Alex Roberts. 

  As fun as the warp core project is, I can't help but to notice something missing in the matter/anti-matter reaction chamber.  That is the TNG-style core would have lights cascading from top and bottom in a blue hue while the reaction chamber itself would emit a whitish violet glow in a slow pulsing motion.  The latter effect being the result of the reaction itself.

   It occurred to me that such an effect could perhaps be achieved by simplifying and slowing down the phaser effect.  In that the meeting point would need to be fixed, and the pulse durations would need to be much longer.  Not to mention the colors would need to be changed, but thats easy enough already.  I was thinking this might be an interesting introduction sketch for someone looking to learn how to code the full featured phaser array.

The original code posted by A.Roberts is quite simple as well, but I can't figure out where it sets up the meeting point or where I would add in the combustion effect.

// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library
#include <Adafruit_NeoPixel.h>

// Which pin on the Arduino is connected to the NeoPixels?
#define PIN            6

// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS      32




// When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals.
// Note that for older NeoPixel strips you might need to change the third parameter--see the strandtest
// example for more information on possible values.
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

int delayval = 100; // delay for half a second

void setup() {
  pixels.begin(); // This initializes the NeoPixel library.
}

void loop() {
  // For a set of NeoPixels the first NeoPixel is 0, second is 1, all the way up to the count of pixels minus one.

while(1){
  for(int i = NUMPIXELS - 1; i >= (NUMPIXELS/2); i--) {
    // pixels.Color takes RGB values, from 0,0,0 up to 255,255,255
    pixels.setPixelColor(i, pixels.Color(0,0,255)); // Blue Bright
    pixels.setPixelColor(i+2, pixels.Color(0,0,40)); // Blue Not So Bright
    pixels.setPixelColor((NUMPIXELS-1)-i, pixels.Color(0,0,255)); // Blue Bright
    pixels.setPixelColor((NUMPIXELS-3)-i, pixels.Color(0,0,40)); // Blue Not So Bright
    pixels.show(); // This sends the updated pixel color to the hardware.
    delay(delayval); // Delay for a period of time (in milliseconds).
    pixels.setPixelColor(i, pixels.Color(0,0,0));
    pixels.setPixelColor((NUMPIXELS-1)-i,pixels.Color(0,0,0)); // Setting the pixel to no output
    pixels.setPixelColor((NUMPIXELS-3)-i,pixels.Color(0,0,0)); // Setting the pixel to no output
    pixels.setPixelColor(i+2,pixels.Color(0,0,0));
    pixels.show();
  }
}
}

T

Thank You for your help in advance,

   Andrew J


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 9 years ago
Posts: 2311
Topic starter  

Hi Andrew,

it's been quiet here for a while but that doesn't mean we forgot the project 😊 

An idea I had, and am still thinking of implementing, is something like a Star Trek effect library (delayed due to all kinds of life complications like Covid, work, etc)... and your Warp Core would fit into that just fine! I'm terrible at the purist details, but if you can find a youtube video or something where we can see the actual effect, then we most certainly can do an attempt to work on this ...


   
ReplyQuote
 Anonymous
Joined: 53 years ago
Posts: 0
 

@trace - wow this warp flash is absolutely perfect and just what i need to add to my model! i've read right through this thread - is this a particular code you have? i have limited experience programming but have managed to add flashing Nav Lights etc - this is something completely out go my league! any help you could offer would be appreciated!


   
ReplyQuote
(@trace)
Estimable Member
Joined: 3 years ago
Posts: 121
 

@hans Hi Hans, reading about you thinking about a Star Trek Light Effect Library makes my heart beat rate faster :D So whenever you are working on it, just let me know to figure out how such library can look like aka which effects should be in it.


   
ReplyQuote
(@trace)
Estimable Member
Joined: 3 years ago
Posts: 121
 

@phil1701 Hi Phil, because of our Email conversation, I don´t reply here. But it would be great to let us all see here how far you come with your project.


   
ReplyQuote


(@trace)
Estimable Member
Joined: 3 years ago
Posts: 121
 

@hans Here is a video from the Warpcore. As you can see, the whole LED stripe has a slightly violet tinted glow and from each end comes a blue hot spot meeting at the middle of the stripe. At the middle of the stripe where the blue hot spots meet, should be a pulsating violetish/yellowish light getting bright every time the hot spots meet there.


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 9 years ago
Posts: 2311
Topic starter  

Everytime I see what we've being doing (in this thread) I do get excited as well! 😊 

We should maybe compile a list of effects for our library?
I can see the Warp core work just fine 😁 

Note: I LOVE Star Trek, but I'm not an expert on it, so I may get the lingo and desired effects a little wrong at times. Apologies up front on! 😉 


   
ReplyQuote
(@trace)
Estimable Member
Joined: 3 years ago
Posts: 121
 

Hi Hans, we already had a list of effects a few pages ago. But of course I can gather them again and maybe add more. Also other Trekkies can give us some ideas at which effect to add.

So we already have the Phaser Effect, where LED´s from each end are running down the strip to meet somewhere getting brighter and pulse.

Then we have the warp effect, where we have a steady glow and with a push button the glow gets brighter, flashes with another color and "cool down" again to the steady glow.

Then we have the torpedo effect, which is the same as the warp effect, just with different timings and colors. But we wanted to add an option to have two torpedoes shooting alternating left and right a few times.

And we wanted to have a "fire all weapons" mode, where it shoots some phasers, then torpedoes, then phaser again for example, with one single button push.

If you want, I can link some videos?!

Next would be the warp core effect.

And no apologizes accepted, cause you don´t have to apologize. You do so great great stuff on here, it is totally fine to make mistakes. And mistakes are there to learn from them.


   
ReplyQuote
(@trace)
Estimable Member
Joined: 3 years ago
Posts: 121
 

@hans And what about Nav-Lights? An easy way for simple LED´s to make them blink in different patterns. Like, single blink with adjustable timings for on and off time. Double blink also with adjustable timing. Maybe a channel for fading effects, just a simple on off fade or maybe fading high with a short blink (flash) at maximum, also adjustable with timings.
Im sure I can also find videos for those effects.


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 9 years ago
Posts: 2311
Topic starter  

Sorry for not replying yet - running into some issues here 😞 

We should probably start with how we want to interface this, next define the Star Trek effects and last the extras?

I'm just guessing here, but each effect should probably have the option to select a specific PIN?
Eg. have the Warp core on one pin, and the Phaser effect on another.

There is a few things we should think about - then again: most of them you (Trace) already experienced in practical use! 😊 

Also: do we want to stick to an Arduino, or maybe go a little more advanced (eg. ESP32 or ESP8266)?
I'm thinking more storage capacity, Bluetooth or WiFi control ? 😊 


   
ReplyQuote


(@trace)
Estimable Member
Joined: 3 years ago
Posts: 121
 

@hans Hello Hans, sorry for late replay. Had a lot to do here also.

I think, for a model builder, it would be practical to just connect different effect LED strips to a specific pin as you suggested. That would mean, we have various WS2812 strips and one PIN for each effect.

Otherwise it would be to complicated to count the LEDs and run wires all the way through the model from each end of a effect-strip to the beginning of another, not to mention left and right.

Also it would be great to have Pins for standard LED effects, like Navlights (which just blink or flash or fade).

But especially for the torpedo effect, I would use single WS2812 LEDs so you can choose the colors for idle-glow, fade up, flash, fade down. Because some ships have idle-glow, some just dont idle-glow at all, then fade up red, then flash bright red or white or yellow and fade down red and then to its idle glow color. Some also flash green and so on.

I think the warp core can be an extra kind of code and does not need to be implemented into our "Star Trek Ship Lighting Programm". Cause the warp core would not be part of a model ship but a self 3D printed model. And the warp core does not need any of those "ship lightings".

Of course we can jump to a more advanced board. But I have to say, I am not experienced with those. So this can be interesting, but should be a better choice.


   
ReplyQuote
(@jlpicard)
Active Member
Joined: 4 years ago
Posts: 4
 

@trace Did someone say Star Trek???


   
ReplyQuote
Page 14 / 14

Like what you see and you'd like to help out? 

The best way to help is of course by assisting others with their questions here in the forum, but you can also help us out in other ways:

- Do your shopping at Amazon, it will not cost you anything extra but may generate a small commission for us,
- send a cup of coffee through PayPal ($5, $10, $20, or custom amount),
- become a Patreon,
- donate BitCoin (BTC), or BitCoinCash (BCH).

Share: