Go Down

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

BulldogLowell

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

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

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

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


jameskirk


BulldogLowell

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 pm Last 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

how about using the arduino for power with a little voltage divider:


jameskirk

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

So what do you think???
Can we do it???
Thank You

BulldogLowell

did you try removing batteries and powering with the UNO directly with the 5V output yet?

jameskirk

#87
Nov 02, 2014, 12:27 am Last 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

I need some help with how to word it
in the code to activate the sound module
Thanks

Go Up