Trouble understanding Pin 9 and Pin 52

Discussion in 'General Programming Discussion' started by Bufford, Nov 27, 2013.

  1. Bufford

    Bufford New Member

    Joined:
    Nov 23, 2013
    Messages:
    1
    Likes Received:
    0
    I'm kind of having trouble understanding whether or not certain pins have their individual use. For example, in the examples section in the arduino ide, the fading led program works with pin nine, but not pin 52. I am just wondering if certain pins have individual aspects, or if I am doing something wrong.
    :D Thanks
     
  2. DracoLlasa

    DracoLlasa UDOOer

    Joined:
    Oct 15, 2013
    Messages:
    419
    Likes Received:
    3
    Re: Pinout Labels for Headers

    im not an expert on this, but i think its because pin 9 is a PWM pin and can take a varying signal output to produce the "fading" but pin 52 is a digital output and can really only be set to high or low. Pins 2-13 are all PWM and should be able to do the LED Fading
     
  3. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    Re: Pinout Labels for Headers

    As Draco correctly states. Pins 2-13 are dual function:- PWM/Analog AND digital.

    It's down to 'pinMode()' and the use of analogRead()/analogWrite() or digitalRead()/digitalWrite() as to how they work in your script.

    Pin 52 is digital only.

    I think you've realised this yourself in the observed behaviour and are just searching for the reason why.
     

Share This Page