Christmas Lights dance to music - trouble with getting earphone jack to work


we working on following project: http://www.hobbyist.co.nz/?q=dancing-lights

the setup looks ok , can 4 leds lighting up, when plug in analog 0 wire , try them flashing music nothing happens. have tried different headphone cable no success. not sure white cable , supposed go. have a0 join directly orange , green cables.

if has suggestions of can try next appreciated. going nyears @ least!

try changing 1st line of code to:
code: [select]

 #define soundpin a0  
your analog input connected pin a0, , that's should reading.

also, it's bad idea connect left & right channels suggest disconnect 1 channel.*

and, prevent negative half of ac audio waveform damaging arduino, input should bias input @ 2.5v.   input biased @ 2.5v, silence read 512.  you can subtract-out bias in software (and can take absolute value or throw-away negative e values).



* if want "get fancy" can connect left & right channels 2 different analog pins.   then, can sum channels in software or make stereo effect different lights left & right channels, etc.



Arduino Forum > Using Arduino > Audio > Christmas Lights dance to music - trouble with getting earphone jack to work


arduino

Comments

Popular posts from this blog

DHT11 Time out error using v0.4.1library

Sketch upload fails with Java error (___REMOVE___/bin/avrdude)!

Arduino Uno + KTY81/210 temperature sensor