Go Down

Topic: Ghostbusters 2 Dancing Toaster (Read 620 times) previous topic - next topic

groundFungus

#15
Oct 11, 2018, 03:40 am Last Edit: Oct 11, 2018, 03:41 am by groundFungus
My apologies.  I put the saving of the last state in the wrong place.

Code: [Select]
if (RFBUTTONCSTATE != RFBUTTONCLASTSTATE)
{
   if (RFBUTTONCSTATE == HIGH)
   {
      RFBUTTONCPUSHCOUNTER++;
      delay(50);     
   }

   RFBUTTONCLASTSTATE = RFBUTTONCSTATE;

   if (RFBUTTONCPUSHCOUNTER >= 3)
   }

ecto-1DM

that works great thanks!!!

what do you know about adafruit products having one more issue then i think i am done

its the wave shield i am having issues with

groundFungus

I have zero experience with the wave shield, but still may be able to help.  What is the issue? 

ecto-1DM

i have all three of them stacked and its not working

from what i see the wave uses pins 7,6,4,3 and so i have the 4 RF buttons on A0,A1,A2,A3 and the 4 relays on 10,11,12,13 and the Neopixel on pin 5

the wave sheild is the only thing not working but if i take the neopixel off the stack it works

groundFungus

I found this in the faq for the  Adafruit wave shield.  Is that your shield?

Quote
What pins are used by the shield?
Pins 13, 12, 11 are always used by the SD card (they are the only pins that have a high speed SPI interface). Then there are 5 other pins used to talk to the DAC and SD card, but they can be set to connect to any arduino pin. However, by default, the library is configured to use pins 10 (for SD card) and pins 2, 3, 4 and 5 for the DAC. To chanage these pins requires modifying the library - the pins are referenced by their 'hardware' pin names (ie PORTD, etc) not by arduino pins.

That means pins 6, 7, 8, 9 and the 6 analog in pins (also known as digital i/o pins 14-20) are available.
Note that to use SPI, pin 10 must be set to OUTPUT. 

ecto-1DM

its the music maker shield but i think it looks like its the same pins

groundFungus


ecto-1DM

lol i just saw that

so i have changed them around the relays and RF is working just not the neopixels

ecto-1DM

ok i think this is the last thing everything is working great thanks to you!!!

only problem i have is it playing the song on RF button Press D and then stopping if i press it again

when i press it it floods the serial command with playing track001 a million times

this is what i have

Code: [Select]
switch (RFBUTTONDPUSHCOUNTER) {
   case 0: musicPlayer.stopPlaying();
    break;
   
   case 1: Serial.println(F("Playing track 001"));
           musicPlayer.startPlayingFile("track001.mp3");
    break;

Go Up