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