This experimental project shows how to use ATtiny13 to synchronize live music and lights with only a few additional components required. Project uses single ADC (Analog to Digital Converter) channel for signal acquisition and some DSP (Digital Signal Processing) calculations that in real-time separate three frequency bands and make the LEDs dance in sync with the music. This project also proves that real-time DFT (Discrete Fourier Transformation) is possible on such small MCU like ATtiny13, which offers only 64B of RAM and 1024B of FLASH. Project doesn’t require any specific equipment and the parts costs are below 3$.
>ADCSRA |= _BV(ADPS2)|_BV(ADPS1); // set ADC division factor 64;
Are you sampling ADC with 150kHz ? and if so why ?
A fun twist of your code would be to put it inside a flash-light driver