77Views10Replies

Author Options:

How to create led lights and sound turn on one after the other when a button is pressed? Answered

I am crating a project that consists of an array of led lights that turn on one at a time in order from first to last with a delay in between each led.  In this project I also have to include a recorded sound to each led that will play once the led is on. Once I release the button the only the lights that got to turn on stay on .  Any help will be gladly appreciated!!!

Discussions

0
None
Cervantes66

2 years ago

i got the code to work but not the button im using an arduino to do the project any help on the code to get it to work

image.jpeg
0
None
Downunder35m

2 years ago

Sounds like the teache has not given out enough info and student has not paid enough attention ;)

0
None
Cervantes66Downunder35m

Answer 2 years ago

I am not a student at any university, I want to learn from the ground up so I set up a challenge for me to achieve. I do have several programming experience and circuit experience but not enough. Any help is appreciated.

0
None
icengCervantes66

Answer 2 years ago

You could use an LED strip that allows uP control of each individual LED.

Then for sound a simple piezo driver.

Finally a parallax basic stamp can run your show.

----------------------------------------------------------------------------------

Use three output lines to control the individual LEDs

Two more lines can drive two N channel MOSFETS 2N7000 can drive a piezo disc at different frequencies to produce sound pressure tones from a higher voltage ( you don't need to only use the resonant FQ ).

The Stamp micro-controller is 24pin dip that runs on 5 VDC but an on board regulator allow you to power it directly from 12VDC as do all the other items.

------------------------------------------------------------------------------------------------

If this is interesting to you, I will sketch it up for you and maybe help with software...

0
None
Cervantes66iceng

Answer 2 years ago

Thanks iceng,

It would be lots of help if you were to help me out with a sketch. I already have one done and would like to compare it to make sure i am in the right direction.

0
None
icengiceng

Answer 2 years ago

Do add capacitors where necessary... The 12v power supply is sized for the current mostly needed by the LED strip plus the stamp and piezo driver.

This kind of driver can do interesting audio by Hi Fq PWM...

BTW these stamps can run straight machine language as a subroutine.

And do try to mark the best answer in your opinion...

0
None
rickharris

2 years ago

How far have you got?

The LEDs you use matter - How many

Your budget

What sort of recorder

What skills have you or are you prepared to develop? eg programming skills.

0
None
Cervantes66rickharris

Answer 2 years ago

I am not a student at any university, I want to learn from the ground up so I set up a challenge for me to achieve. I do have several programming experience and circuit experience but not enough. Any help is appreciated.

0
None
rickharrisCervantes66

Answer 2 years ago

Ok but you didn't answer all of the questions.

Your going to need a microprocessor to do this easily.

To make best use of the inputs and outputs look up charliplexing.

https://www.instructables.com/id/Starting-a-micropr...

https://www.instructables.com/id/Starting-programmi...

https://www.instructables.com/id/Lets-Program-a-PIC...

https://www.instructables.com/id/Reading-Sensors-Wi...

Your going to need to invest some money in a small amount of equipment.

depending on the type of micro you select.

You should aim to get a good grasp of essential electronics, what things do and why - Understanding is important.

https://www.instructables.com/id/How-electricity-an...

If you want to take a pure electronics approach then look up how the 4017 works. and the 555 timer.

Your choice of sound player will dictate how you play a sound. There are micro controller sound modules that can lay sounds from memory.

http://www.picaxestore.com/index.php/en_gb/picaxe/...

Start with small projects and build skills and knowledge.

You can learn a LOT just flashing a few LEDs