joeyoravec / stargate

Software to control LED ring on a Gottlieb Stargate pinball machine
0 stars 0 forks source link

Type of rope #2

Open mindstorm88 opened 6 months ago

mindstorm88 commented 6 months ago

Hi, do you remember the type of rope and how many leds/m you have?? your link for it is dead.

Thanks

mindstorm88 commented 6 months ago

i tried a 60 leds/m , it is working, but it seems that the attract and gameplay does the same pattern !!! is it how it is suppose to be ??

joeyoravec commented 6 months ago

do you remember the type of rope and how many leds/m you have?? your link for it is dead.

Search for WS2812B T0612 1m strips. This is:

Although my original link is dead, it looks like there many suppliers on ebay selling "neon sign" or "silica gel tape light" with these specs.

it seems that the attract and gameplay does the same pattern !!! is it how it is suppose to be

It looks great in person but I've never been able to get a good video. See my comment here for details: https://github.com/joeyoravec/stargate/issues/1#issuecomment-1759593134

Originally the "christmas tree lights" on SOL21 would blink during attract + multiball. The Arduino software looks for that blinking to decide when to run the effect. Let me know if you have any ideas for a different pattern.

mindstorm88 commented 6 months ago

ok thanks, looking at the code i realized that it is a 96 leds/meter !!!

at idle i get only few white dots.

when i push the test button i do get the gate pattern.

is the code on github your latest rev?? it really seem in the code that attract mode and gameplay does the exact same pattern !! the interpretation is never use to select a pattern in stargate.ino!!

`switch (pulse.interpretation()) { case pulse_sol21::mode::gameplay: case pulse_sol21::mode::attract: newPulseAvailable = true; Serial.print("sol21 pulse width "); Serial.print(pulse.high_time()); Serial.print(" ms (Begin: "); Serial.print(pulse.rising()); Serial.print(" End: "); Serial.print(pulse.falling()); Serial.print(")\n"); break;

case pulse_sol21::mode::invalid:
  Serial.print("Ignoring invalid pulse: \n");
  Serial.print(pulse.high_time());
  Serial.print(" ms\n");
  break;

default:
  Serial.print("Ignoring unrecognized pulse type\n");
  break;
}

got_pulseRisingEdge = false;

} }

bool gate::is_triggered()`

mindstorm88 commented 5 months ago

Hi i'm pretty sure that your code posted here is not your latest rev, as the code in idle has the chevrons Black, not red, but that's not a problem , i'll let you know if i do some change to do different stuff with attract and gameplay pulses !! Thanks for your work..

joeyoravec commented 5 months ago

looking at the code i realized that it is a 96 leds/meter !!! at idle i get only few white dots.

Whoops my earlier comment "At idle it's white with red chevrons" was incorrect. At idle gate is white with black chevrons, intended to look like an inactive gate. Red is only used to represent locked chevrons. I've edited that message to correct

Something is wrong if you're only seeing a few white dots. Perhaps the LED strip, since there was a mix-up about 60 leds/m vs 96 leds/m. I mentioned the specs for the correct LEDs above.

is the code on github your latest rev?? it really seem in the code that attract mode and gameplay does the exact same pattern !!

Yes latest rev, and yes that is correct. See the comment:

void gate::isr()
{
  // TRIGGER_PIN is connected by opto-isolator to SOL21 (open drain, ground)
  // SOL21 is asserted normally, eg. ring is normally illuminated
  // During attract mode the effect is 262ms period (50% duty cycle)
  // During game-play the effect is 100ms period (50% duty cycle)

in other words, "SOL21 pulsing" is interpreted as "effect active". It's a little tricky because the line pulses at different frequencies during attract and gameplay. This ISR detects both.

As you state it handles them the same way:

    switch (pulse.interpretation())
    {
    case pulse_sol21::mode::gameplay:
    case pulse_sol21::mode::attract:
      newPulseAvailable = true;

by playing the same "dial the gate" animation in both cases. Sure it would be possible to do a different visual effect in each mode but that's the only effect that I designed and it looks good in both cases.