Go Down

### Topic: LED Bar graph and Button (Read 19068 times)previous topic - next topic

#### BulldogLowell

#75
##### Oct 27, 2014, 03:13 pm
so, you need 5 outputs... Do you have 5 pins to use (not including 0 or 1)?

hint... you can move some of those ledPins over to A1-A5.

Code: [Select]
`const int ledPin[10] = {A5,A4,A3,A2,A1,6,5,4,3,2};`

and put those switches to digital pins available...

common grounds... remember.

#### jameskirk

#76
##### Oct 27, 2014, 09:47 pm
I would like to use only 4 of the buttons on the sound module???
Also is it possible to when I push the buttons for the LEDs like 5 then push the fire button
for a sound then 7 hit the fire button for a different sound and then 10 for another sound???
I have A1-A7 pins available...
Thanks

#### BulldogLowell

#77
##### Oct 27, 2014, 11:06 pm
sure,

you have to determine if the buttons are closing the circuit or opening the circuit.  So, simply use your multimeter to check for a voltage across the two posts of the switches.  Hopefully you have the same voltage across each of them.

Let us know.

#### jameskirk

#78
##### Oct 28, 2014, 03:48 am
The voltage is the same the buttons are N/O...
It took me a while to figure it out i'm not to good with a multi-meter...
Thanks

#### BulldogLowell

#79
##### Oct 28, 2014, 04:26 am
so what was the voltage?

#### jameskirk

#80
##### Oct 28, 2014, 04:46 am
They are 4.27v...
Thanks

#### BulldogLowell

#81
##### Oct 28, 2014, 03:43 pm
I'm thinking that you can power the sound module from the arduino (instead of its batteries) and just attach the switch pins to available outputs pins.  One power supply, easy.

That's assuming your module is friendly to 5V.

#### jameskirk

#82
##### Oct 28, 2014, 11:19 pmLast Edit: Oct 28, 2014, 11:20 pm by jameskirk
2 things
1. The module is 4.5v
2. Can I burn this sketch on an attiny 85???
Also what should I power it with???
Thanks

#### BulldogLowell

#83
##### Oct 29, 2014, 02:32 am
how about using the arduino for power with a little voltage divider:

#### jameskirk

#84
##### Oct 29, 2014, 03:27 am
The problem with that is space...
I was hoping that I could use the attiny 85
to shrink everything so it will fit in the Phaser...
Is that a problem or not?
Thanks

#### jameskirk

#85
##### Oct 31, 2014, 02:22 am
So what do you think???
Can we do it???
Thank You

#### BulldogLowell

#86
##### Nov 01, 2014, 03:38 pm
did you try removing batteries and powering with the UNO directly with the 5V output yet?

#### jameskirk

#87
##### Nov 02, 2014, 12:27 amLast Edit: Nov 02, 2014, 02:11 am by jameskirk
I removed the batteries and you can't backwards feed the
Sound Module thru the switch...
On my Captain Kirk Chair Project I have to separately power the
sound module...
Thanks

#### jameskirk

#88
##### Nov 03, 2014, 02:04 pm
I need some help with how to word it
in the code to activate the sound module
Thanks

Go Up