Forum Replies Created
-
AuthorPosts
-
BillMember
Take a look at this code:
http://lowvoltage.wordpress.com/2011/05/15/min-max-sketch/
It’s what you have to do in order to try and get an over all amplitude. just sampling a few times isn’t enough.
BillMemberWhat you are asking is much, much more complicated then you think. Sound from music is made of of tons of frequencies. Just sampling the audio output will give you ‘random’ results because you have no idea where on the waveform the sample is getting taken.
I suggesting googling for what you are trying to do. Here’s a link I found quickly of someone trying to do something like you: http://arduino.cc/forum/index.php/topic,11829.0.html
BillMemberHadn’t considered the need to return if the controller is still responding. I’ll add this feature in the next release.
BillMemberNo annoyance. Just wanted to make sure you tried everything before continuing! Glad you got it working.
BillMemberGlad you got it working.
There are whole off branch professions of engineers who specialize in electrical contacts. It may defy logic as a beginner, but you’ll learn that just because pins look like they are touching, doesn’t mean electricity can get through. Soldering creates a chemical bond between two metals and guarantees a good connection.
BillMemberYou can make sure the analog pin is working by connecting it to GND or 5V and then you should see the values change. Just unplugging the wire shouldn’t always make the values change.
Now ready the ‘volume’ of the output sound is a different story. Remember sound is sine wave signal. Reading it with an analog pin is going to produce different results depending when the sample was taken during the sine waveform. In order to do what you want, you should take several dozen samples and pick the biggest one to represent the amplitude of the sound at that time.
BillMemberDid you try all the steps in the troubleshooting guide yet? This looks like it could be a pullup or clock problem.
BillMemberNo, all ports should work. You sure you put the right serial port in the begin function?
BillMemberI highly doubt it is absolutely required just to give the thing power
Well, you are highly wrong. Not only is it absolutely required, by trying to run the shield with unsoldered headers may have already damaged your shield. Loose headers create brownouts and very high frequency noise across data and power lines. One or both of those symptoms may have damaged the sensitive MP3 Decoder. Both symptoms are nearly impossible to see with a regular volt meter.
Before Michael or I can help you any further, solder the pin headers (all of them) to the shield and report the results. I’m not trying to be mean, but you are asking us to help you get your car moving even though it has no tires on it.
BillMemberI am concerned that your headers are not soldered in to the shield. Which may cause these symptoms.
Judging by this earlier post:
Do i actually need to solder the headers onto the chip itself? I figured since the header polls are touching the circular metal rims of the mp3 player shield, the shield would still get electricity.
He did not solder the pinheaders to the shield. Yes, you need to solder the pinheaders to the shield.
Sorry, I’m trying to play catchup on the forum posts.
BillMemberIf you want just on and off, you should not be looking at the analog values. There’s a seperate data call for the digital (on/off) values.
Use
ps2x.Button(PSB_PAD_LEFT)
Not
ps2x.Analog(PSAB_PAD_LEFT)
BillMemberDid you get it working?
BillMemberRest of the pins just tape off.
Yes, take the analog values from the sticks and feed them to you motor controller. You might have to remap the number ranges to match the correct number range for your controller.BillMemberDid you get it working?
BillMemberThere is an example included with the library.
-
AuthorPosts