Pages: [1]   Go Down
Author Topic: Pro Mini, 6 LED's, and tone.h library help  (Read 506 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've got a quick little project that's got me scratching my head.

I'm using an Arduino Pro Mini to flash 6 LED's based on the motion of an accelerometer.

The LED's are connected to pins 12,11,10,9,8 & 7.  I've also got a 3 Axis Accelerometer connected to analog pins 0,1 & 2.

My sketch works great until i connect a piezo speaker to pin 6 and start using the Tone Library (located here: http://code.google.com/p/rogue-code/wiki/ToneLibraryDocumentation).

My sketch runs for a second then hangs.

The tone library states "Using this library will affect usage of the PWM outputs, so be aware.".. so my stupid question is...

Are all the PWM pins (3, 5, 6, 9, 10, and 11) off limits to me?  What can i do to get all my 6 leds to blink AND get some music going?

Any help would be appreciated!

~Brian
Logged

Los Angeles
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am unsure exactly what you are trying to do, but have you checked out the mux breakout
http://www.sparkfun.com/commerce/product_info.php?products_id=9056
Logged

Pages: [1]   Go Up
Jump to: