Sorry if this is a dumb question, but do you have a resistor in series with the LED, or is the LED connected directly to the Arduino?
There are a lot of tutorials and also guidance on the datasheet.
QuoteDirectly connected. BAD BAD BADEven if it did not solve your immediate problem it will cause others.QuoteThere are a lot of tutorials and also guidance on the datasheet.So which one are you trying to follow? Link please.
Why is it so ? I always used LEDs directly. I really don't know the potential problems ?
QuoteWhy is it so ? I always used LEDs directly. I really don't know the potential problems ?The problems that you are destroying either your LED or the thing that drives it.Read this:-http://www.thebox.myzen.co.uk/Tutorial/LEDs.htmlThanks for the link. So now you need to post what you are doing. A good quality photograph, less that 1000 pixels wide woul be a good start.
when the end of the cable connected to the A0 input is floating, there is some random noise and when I touch the cable it changes prominently.
but when it comes to reading it through an Analog input,
Quotewhen the end of the cable connected to the A0 input is floating, there is some random noise and when I touch the cable it changes prominently.That is exactly what I would expect.Quotebut when it comes to reading it through an Analog input,What do you mean by that?Can you post a schematic of what you have actually done. I can't marry up those photos with the schematic on that link.
The capacitor between pins 1 & 2 is for supply decoupling. This should be a ceramic type capacitor, not the type that you have used. It could be that the chip is oscillating as a result.
Are you sure that's the reason or is this just a guess ?
QuoteAre you sure that's the reason or is this just a guess ?I am sure that the capactor you have used is useless for the task you have give it so it needs changing in any case. if you have anything else wrong it is hard to say at this stage. You must always correct the things that are wrong when ever you see them. As itcouldexplain everything and needs changing anyway then you loose nothing by changing it.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16