CountDeMonet / ArduinoProtonPack

Arduino Code for a GhostBusters Proton Pack
https://vineripesoftware.wordpress.com/2017/10/24/3d-printing-a-proton-pack-plus-lights-and-sounds/
Apache License 2.0
91 stars 31 forks source link

Sound won't trigger it. #11

Closed xblix closed 4 years ago

xblix commented 4 years ago

@fstanley28 how you fix your sound problem finaly.

same situtation.

all wires look perfectly hook up to the right pin.

i can trigger by ground pin all sound but via uart = no sound and no trigger.

any clue? @CountDeMonet ? There is a video for understand my issue: https://youtu.be/KuHlIw8GJx0

Just an update on progress. Got the sound working. Everything is firing as it should! Now to put everything together for the finished pack. I appreciate everyone’s help here.

Originally posted by @fstanley28 in https://github.com/CountDeMonet/ArduinoProtonPack/issues/5#issuecomment-461767544

fstanley28 commented 4 years ago

I forget exactly what I did. I believe though that I double checked everything and reloaded the sound files onto the soundboard and that fixed it.

CountDeMonet commented 4 years ago

The pack code does not log to serial out which is why it is not doing a Serial.begin(115200); It is mainly to free up resources. You can certainly add the serial begin and then log to the serial port by adding Serial.println("debug message"); anywhere in the code. This can be useful to debug issues but does eat a lot of resources which is why I took it out after the code was tested.

Since you have the menucommands sketch working that is great. What is not clear from your video is what the proton pack code is doing. Are you getting any lights for the cyclotron and powercell when you flip on the main switch (pin 8)?

xblix commented 4 years ago

Yes all my lights and switchs work and react like original code suppose.

CountDeMonet commented 4 years ago

using the menucommands sketch I want you to type the list command (L) and then copy and paste the results into this thread

xblix commented 4 years ago

I forget than i convert all .WAV on .OGG for save space on soundboard. After changing all .wav in .ogg in the code all perfectly work now. Thanks @CountDeMonet for point me out the files list trick (L).

One thing not work properly is the vent light. The vent light show up only 2 second instead to show up for the entire venting sound time like in your demo video...any clue to augmented times the vent light show up in the code ?

CountDeMonet commented 4 years ago

that is odd. The venting lights are controlled by the isVenting boolean variable. That is only set to false on startup and when the booting animation is complete so you should see the lights on for the entire boot animation. Can you take a quick video of what is currently happening?

xblix commented 4 years ago

its look like the "vent animation" stop after 1 second instead during all "vent sound" time https://youtu.be/t5wr8_8CiaI in this set up the last neopixel on the strip is the vent white light.

CountDeMonet commented 4 years ago

Well it's not actually doing the full reset animation and looks like it does one second of the reset then back to the standard. Can you post the code you are using? Looks like you had to make some mods to it for that config.

xblix commented 4 years ago

yellow cycle suppose to show too but no yellow

https://pastebin.com/1qScEVrw

CountDeMonet commented 4 years ago

ah, I think I figured out what is going on. You are using 3 neopixels for the powercell animation. If you look at how the animations work they are timed with the sounds using intervals based off the number of neopixels in the animation. In this case the boot animation as that is the one triggered on a "venting". In the original configuration there are 14 neopixels in the powercell. That is the one that is dictating how long to "vent" for.

void powerSequenceBoot(unsigned long currentMillis) // function in question.

In the main powercell boot animation I have 14 neopixels involved and an update interval of 60 miliseconds. The animation starts with all leds off and then does a follow pattern stopping at the last light until all lights in the powercell are on. At 60ms with 14 neopixels that's about 6 - 7 seconds which is how long the audio file is. Since you reduced the number of neopixels for the power cell you will need to change the delay to take into account the reduced number of leds.

const unsigned long pwr_boot_interval = 60; // interval at which to cycle lights (milliseconds). Adjust this if

Just a guess but it's probably going to need to be closer to 1000 ms as with the 3 led's that leaves only about 6 "frames" for the animation I believe.

xblix commented 4 years ago

i dont change the code since yesterday cause i see something... https://youtu.be/fhZpvA5-lyI animation its ajusted by the const number of led and works good without soundboard connected but ....with sound board connected.. not...only 1 second

CountDeMonet commented 4 years ago

When you are disconnecting the soundboard you are causing delays to occur due to failures to communicate with the sound board. These are the pauses each time it tries to play an audio track. If you actually disable the sound board within the code and don't attempt to play the tracks or access the play state then you will find those delays go away and the code acts the same way. The issue is the timing of the intervals and the number of led's in the animations.

xblix commented 4 years ago

const unsigned long pwr_boot_interval = 680;

all slick now. thanks for help and this great code @CountDeMonet

CountDeMonet commented 4 years ago

glad to hear you are sorted. Going to go ahead and close this ticket. Thanks