November 24, 2024, 02:56:19 PM

News:

You can now use Vixen to program your Prop-1 and Prop-2 controllers!  Get started quickly and easily, without having to learn PBASIC.  Details in the Library forum.


ap-16 status led wont stop blinking green/cuts audio short

Started by gadget-evilusions, October 18, 2010, 05:15:44 PM

Previous topic - Next topic

gadget-evilusions

Hello,

I have attached the program I am using in my prop-1/ap-16 set up. The .wav files can be found here, http://www.evilusions.com/brianhostedfiles/MBVwavs.zip (they were too large to attach). These files and program ran fine on one set up before I shipped it out. Currently I am setting the exact same thing up and I am coming up with an odd thing. When P6 is triggered, the audio is only played for a split second, and then nothing, when it should be looping. When P5 is triggered, the audio is played for a split second and then silent. The relay still functions properly on the ap-16, like it know when the file would end. Even after the reset command is sent to the ap-16 the green status led continues to blink until i cycle the power on the ap-16. I have loaded the most current update, and have tested the outputs on the ap-16 with Jon's SFX demo files and the manual play button. The outputs on the prop-1 do exactly as I have programmed properly as well.

I am currently stumped.
Brian
Evilusions LLC
www.evilusions.com for all your pneumatic components

JonnyMac

Brian,

I've run your program and can't get it to misbehave.  The one thing I would suggest is adding a 2-second delay at the beginning so that you can ensure the AP-16+ is ready before you attempt to talk to it (applies to a power-up).

Power_Up:
  PAUSE 2000

Reset:
  PINS = %00000000                              ' clear all outputs
  DIRS = %00011111                              ' make P0-P4 outputs

  SEROUT Sio, Baud, ("!AP16", Addr, "X")
Jon McPhalen
EFX-TEK Hollywood Office

gadget-evilusions

http://www.youtube.com/watch?v=oFMYU95mjSM

I added the pause and I get the same operation. I took a video so you can see exactly what is happening.
Brian
Evilusions LLC
www.evilusions.com for all your pneumatic components

JonnyMac

I'm not sure starting your Prop-1 with a screwdriver is a great ideas <wink>, but that should hurt anything.

Just for grins, why don't you reload the firmware (I just posted 1.03b today) and see if that makes a difference.  I don't know why it should, but as I told you, I ran you program several times on my bench today and even tried to get it to fail by having Trigger2 immediately follow Trigger1.
Jon McPhalen
EFX-TEK Hollywood Office

gadget-evilusions

I added two n.o. momentary push buttons so that I am not triggering with my efx-tek screwdriver any longer.

I installed the updated firmware.

The status led no longer continues blinking after the program is over, however the audio files are still being cut short just like before. I would say it could be the files, but these exact files worked on my first ap-16, and there is video proof in the completed projects section.

Any other thoughts?

Brian
Evilusions LLC
www.evilusions.com for all your pneumatic components

bsnut

Brian,

I have one suggestion for you and that is and I know you have done it. Play your WAV file on your computer and see how long it plays and then check it against the AP16+ time to see if they match. If both times are the same, then it is your file and you need to correct that part. Now, if your doesn't match the one you have on your computer, then the problem my lie in the SD card. Since you updated the firmware for the AP16+, I don't think that is the problem. I would update the sound file on the SD card.
William Stefan
The Basic Stamp Nut

JonnyMac

Brian,

I ran your code on my AP-16+ without any problems.  Please contact JB about a swap.
Jon McPhalen
EFX-TEK Hollywood Office

gadget-evilusions

I tried one other thing. When I substitute my file names for "sfx01" and "sfx02" they play fine. I have the most current edition of audacity and all my settings are exactly as specified by the forums. I reformatted my SD card, and re exported the wav files.

Since Jon's sfx files work, I don't think it's the board, but I can't find the issue.
Brian
Evilusions LLC
www.evilusions.com for all your pneumatic components

JonnyMac

So the program, which works for me with your file names, now works for you when you call the files "SFX01.WAV", etc? 
Jon McPhalen
EFX-TEK Hollywood Office

gadget-evilusions

No sir, sorry, should have been more clear. YOUR files, the AP-16 test files, sfx00-15, work. I tested them instead of my files, and as the ambient track, and they all work. It's kind funny listening to you say "SFX 05" over and over and over when I renamed it ambient.wav. So now it must be something with my files. They are the exact same files that worked before, the exact same brand and batch of SD cards, everything.

Do my files work on your AP-16 that you tested my code on?
Brian
Evilusions LLC
www.evilusions.com for all your pneumatic components

JonnyMac

Yes, I used your files and your code -- works fine.  I would suspect the SD card; maybe you got a bogus one. 

You're not using a microSD card in an adapter, are you?  The uSD cards won't keep up at 44.1kHz, you have to drop to 22kHz (I've found in experiments for my friends at the Mouse House).
Jon McPhalen
EFX-TEK Hollywood Office

JonnyMac

Even if you have a full-size card, try 22kHz and see if that makes a difference -- it would point out that the card can't keep up.  SD cards are rated by speed, maybe you ended up with a really slow one.
Jon McPhalen
EFX-TEK Hollywood Office

gadget-evilusions

I am using standard SD cards.

That may make sense. Your SFX files are 22khz and they play fine.

I will go buy a few other brands of SD card and try them tonight with the 44.1 khz files, and I will additionally try converting my files to 22khz.
Brian
Evilusions LLC
www.evilusions.com for all your pneumatic components

gadget-evilusions

Ok. I tried taking my files down to 22khz, and they worked a little better, but still cut off before it finished playing. I even tried down to 11khz and it got better, but not 100%.

I went to Bestbuy and bought a PNY Optima SDHC Card that said minimum of 4mb/s transfer rate. All my files now work at 44.1khz now. I guess I can't use the $7 2gb cards I buy at microcenter, who knows what their transfer rates are. So I guess the lesson is buy good SD cards with minimum transfer rates marked on the package.

I am sorry about all the problems, it just didn't make sense to me why it worked before, and not now, but everything makes sense now.
Brian
Evilusions LLC
www.evilusions.com for all your pneumatic components

bsnut

Brian,

Its call learning and you learned something and I learned not to buy the cheap SD cards.

William Stefan
The Basic Stamp Nut