i received my arduino duemilanove yesterday and started playing around with it.
After a little while i tried to control 2 leds but that didnt worked so well.
In the picture below u see my circuit.
The red LED shines bright and the green led only glows.
When i swap the positions of the leds (green to red and red to green spot) the behavior stay the same.
Except that the green light is bright and the red one nly glows.
hey ya am getting da same prob wid ma new arduino mega... trying it out wid 5 led's. wid da pwm pins its getting the same prob and wid da digital output pins its all dim... i need help on dat too... u get a solution, let me knw.
Well in both your cases it's hard to do a good analysis of your problem with a posting of your code. Sometimes we also need a drawing of how it is wired up and the specifications (or vendor part number) of the specific LEDs you are using. Otherwise we are kind of guessing and shooting in the dark
Often it is useful to steer an input pin to a known state if no input is present. This can be done by adding a pullup resistor (to +5V), or pulldown resistor (resistor to ground) on the input, with 10K being a common value.
There are also convenient 20K pullup resistors built into the Atmega chip that can be accessed from software. These built-in pullup resistors are accessed in the following manner.
pinMode(pin, INPUT); // set pin to input
digitalWrite(pin, HIGH); // turn on pullup resistors
Note that the pullup resistors provide enough current to dimly light an LED connected to a pin that has been configured as an input. If LED's in a project seem to be working, but very dimly, this is likely what is going on, and the programmer has forgotten to use pinMode() to set the pins to outputs
hmm for my case i could manage to use the pwm by setting the pwm value to high 255, it goes bright but when i use the digital output its still dim, and voltage is still 2.4v. u guys have any idea why and how can i increase the voltage? koz its hardly noticeable thats its lighten up