Was kind of playing with a hopefully simple idea in my head earlier today, and was kind of wondering if it's do-able. Kind of need some direction.
I won't to use a piezo speaker to detect sound or vibration, to be read into a microcontroller. Then I want to output an audio signal through the same speaker. Don't know a whole lot about the timers, or ADC. I don't think the piezo will produce a strong enough signal to be seen on an input pin, so figure ADC. I don't need any kind of accuracy, just something above normal background noise.
For the sound output, it would be much louder if I can sort of push-pull the speaker across to I/O pins. So wondering if I can hook the speaker across to pins, and get an input for the ADC?
Planning on using a ATtiny13, it's 8 pin, but only 5 usable I/O pins. So hope to have the other three for other uses.
I won't to use a piezo speaker to detect sound or vibration, to be read into a microcontroller. Then I want to output an audio signal through the same speaker. Don't know a whole lot about the timers, or ADC. I don't think the piezo will produce a strong enough signal to be seen on an input pin, so figure ADC. I don't need any kind of accuracy, just something above normal background noise.
For the sound output, it would be much louder if I can sort of push-pull the speaker across to I/O pins. So wondering if I can hook the speaker across to pins, and get an input for the ADC?
Planning on using a ATtiny13, it's 8 pin, but only 5 usable I/O pins. So hope to have the other three for other uses.