[EMS Discuss] from Joshua Phelps

Bob Miller EMAIL HIDDEN
Mon Dec 30 12:07:11 PST 2013


Hi, Joshua.

Nice program.  I did not know that the Arduino library could play tones.

I think the problem is that your input pins are floating when they are
not connected to ground.  You can either use an external resistor to
pull the pin up to +Vcc or you can configure them to use the Arduino's
internal resistor.

To use the internal resistor, change your pinMode calls to look like this.

    pinMode(buttonpin1, INPUT_PULLUP);
    pinMode(buttonpin2, INPUT_PULLUP);
    // etc.

Let us know if that works.


On Mon, Dec 30, 2013 at 10:18 AM, Elizabeth Phelps <EMAIL HIDDEN> wrote:
> Hi.  I was wondering whether anyone might be able to help me find the bug in
> this arduino program. I want it to not play anything until I conect a pin to
> ground, and then play the song for that pin. What it does is play thru all
> of the 17 songs and won't stop. Does anyone have an idea?
> Thank you, Joshua
>
> _______________________________________________
> Discuss mailing list
> EMAIL HIDDEN
> http://eugenemakerspace.com/mailman/listinfo/com.eugenemakerspace.discuss
>



-- 
Bob Miller                              K<bob>
                                        EMAIL HIDDEN


More information about the Discuss mailing list