Closed
Description
Board
esp32 dev module
Device Description
devkit
Hardware Configuration
no
Version
v2.0.6
IDE Name
platformio
Operating System
w10
Flash frequency
40
PSRAM enabled
yes
Upload speed
115200
Description
pinMode(15,OUTPUT);
analogWrite(15,255);
pinMode(15,OUTPUT);
analogWrite(15,128);
With this code I expect the second analogWrite to generate a 50% value on pin 15.
However, the second pinMode instruction will set the value of the pin to 0 and every analogWrite after that will not work.
DigitalWrite will work.
Sketch
#include <Arduino.h>
void setup() {
// put your setup code here, to run once:
pinMode(15,OUTPUT);
analogWrite(15,255);
delay(5000);
pinMode(15,OUTPUT);
delay(5000);
analogWrite(15,255);
}
void loop() {
// put your main code here, to run repeatedly:
delay(100);
}
Debug Message
na
Other Steps to Reproduce
na
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.
Metadata
Metadata
Assignees
Type
Projects
Status
Done