Skip to content

Alternating between AnalogWrite and DigitalWrite on the same pin behaves unexpectedly. #31

@Nilloc

Description

@Nilloc

The following sketch causes the LED to go fully bright, then dim (analogWrite(50)) then stay dim, never returning to 5 volts.

The sketch does work as expected in the Arduino 1.0.1 IDE.

void setup()
{
  pinMode(11, OUTPUT);
}

void loop()
{
  digitalWrite(11, HIGH);
  delay(500);
  analogWrite(11, 50);
  delay(500);
}

Tested using a Sparkfun Redboard and a 2.7v LED.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions