Hi all.
I've been out of the Halloween game for a few years, but now I'm having the same problem as before I left with a same basic program. The program is working but the AP-8 is not playing. I have a revision "C" AP-8.
It will play if I push the start button, or if I put the serial cable on the sensor pins. It just won't play with the triggering.
Things I've tried:
Different sd cards - all formatted
Different sounds including my own voice
Also changed the address from %0 to %11 with dip switches moved to on for A0 and A1
I'm lost. If someone can help me out I'd appreciate it. I'm including a copy of the program too. I couldn't do an actual upload. My apologies.
Thanks much.
Steve
' =========================================================================
'
' File...... Skelerector AP-8
' Purpose... Strobe light and LED lights in head on at same time Main body goes up. Audio plays with arms up, then all ends.
' Author....
' E-mail....
' Started...
' Updated...
'
' {$STAMP BS1}
' {$PBASIC 1.0}
'
' =========================================================================
' -----[ Program Description ]---------------------------------------------
' -----[ Revision History ]------------------------------------------------
' -----[ I/O Definitions ]-------------------------------------------------
SYMBOL Sio = 7 ' SETUP = UP; no ULN
SYMBOL Trigger = PIN6 ' SETUP = DN
SYMBOL Arms = PIN4 ' Use OUT4/V+
SYMBOL LED = PIN3 ' use OUT3/V+
SYMBOL Strobe = PIN2 ' use OUT2/V+
SYMBOL MainBody = PIN1 ' use OUT1/V+
' -----[ Constants ]-------------------------------------------------------
SYMBOL Yes = 1
SYMBOL No = 0
SYMBOL TrOn = 1 ' active-high trigger
SYMBOL TrOff = 0
SYMBOL IsOn = 1 ' active-high I/O
SYMBOL IsOff = 0
SYMBOL Baud = OT2400
' -----[ Variables ]-------------------------------------------------------
SYMBOL status = B0 ' AP-8 status byte
SYMBOL playing = BIT7 ' 1 when playing
SYMBOL timer = B2 ' for debounce loop
' -----[ Initialization ]--------------------------------------------------
Power_Up:
PAUSE 3000 ' let AP-8 initialize
Reset:
PINS = %00000000 ' all off
DIRS = %00111111 ' P5..P0 are outputs
PAUSE 20000 ' PIR warm-up/delay
' -----[ Program Code ]----------------------------------------------------
Main:
timer = 0 ' reset debounce timer
Check_Trigger:
PAUSE 5 ' scan delay
IF Trigger = TrOff THEN Main ' check trigger input
timer = timer + 5 ' update timer
IF timer < 100 THEN Check_Trigger ' check timer
T00: ' start of sequence
Arms = IsOff ' Arms stay down 'til sound comes on
MainBody = IsOn
Strobe = IsOn
LED = IsOn
PAUSE 3958 ' 4s - Body up, strobe on, LEDs on
' play audio file, SFX00.WAV
' -- allows testing via AP-8 start button
T04:
SEROUT Sio, Baud, ("!AP8", %00, "P", 8, 1) ' play SFX05.WAV thru SFX08.WAV one time with selector switch on #8
Arms = IsOn
Audio_Wait:
PAUSE 100
SEROUT Sio, Baud, ("!AP8", %00, "G")
SERIN Sio, Baud, status
IF playing = Yes THEN Audio_Wait
GOTO Reset
Hi Steve,
I just noticed your post. I will dig out my AP-8 and see what I can figure out.
Jeff
Steve - I just realized something. This program is for the AP-8. I tested it with mine and it works.
But you mentioned trying different SD cards. Do you actually have an AP-16? I noticed in a post from a few years ago you were using one of those. The commands are different!
Jeff
Trying to use my AP-8 with a mini SD card. It plays the files if I hit the start button, and also if I touch the serial cable to the sensor pins. It just doesn't play when the prop 1 triggers. I've tried every change to the program I can think of, or copy, but no go.
Thanks for the reply.
Any ideas?? I'll check in this evening.
But...is it an AP-8 or an AP-16??
The AP-8 didn't support SD cards, it used a big chip. You had to connect your computer with an audio cable and play the sound on the computer, and then hit the record button on the AP-8.
The AP-16 is a bigger board and uses SD cards.
Check to see which one you have - I think it's the AP-16. That will need slightly different commands.
Jeff,
It is an AP-8. I had to resize this picture to fit, so hopefully it shows up. You cannot see attachments on this board.You cannot see attachments on this board.
On the board - specifically- it reads:
AP-8+
2016-17
Rev C
I suppose there are other revisions that might be different, but I'm not familiar with them. If so, I apologize for the unclarity. This one does not have a record button (it does have a start button), and it absolutely uses a mini card. If there are different versions of the AP-8's, wouldn't they use the same commands? I spent some time playing with it more tonight, but I'm not seeing anything that stands out as being wrong, so I'm a bit lost. I don't want to monopolize your time, so thanks much for looking. I'll check in later.
Steve
OK, now I remember...I looked through the old messages and I see where Jon announced it - you must have been one of the few who got one outside of the OEM customers.
Do you have any docs for it? It was never listed on the site, so there's nothing for me to download and look at. Any sample programs from Jon? I see that the SD card needed to have a config file on it, as in this thread:
http://www.efx-tek.com/php/smf/index.php?topic=2229.0
Wow, a one off item huh. Not good for me. :) No sample programs or documents were ever acquired, and I don't remember anything about a configuration code, so I guess I'll just have to scrap it for now and make something else that can go silent. I'll have to make time to look at all of that configuration code in the link at a later date. My other Halloween projects need some attention. :)
Thanks again,
I do appreciate your help.
Steve
One more thing you can try is to ping Jon on the Parallax forum - he's there a lot, supporting their new microcontroller.
https://forums.parallax.com/
He uses the same name there, "JonnyMac."
Thanks Jeff,
I'll check in to it.
Steve,
Did you ever get in touch with Jon? Did he get you up and going?
Jeff
No, I decided to shift my focus to other items to get me out from behind the eight ball. It'll still be a decent Halloween hopefully.
Thanks much, Jeff.
Steve