Hi all,
I need to use IO25 as a digital output pin, but it seems like it is a DAC output by default.
How do I disable DAC function? I tried the following code but its not working:
#include <driver/dac.h>
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
dac_output_disable(DAC_CHANNEL_1);
pinMode(25, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(25, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(25, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
How to Disable DAC
Re: How to Disable DAC
Code: Select all
pinMode(25, OUTPUT);
Who is online
Users browsing this forum: No registered users and 61 guests