Code: Select all
pinMode(A0, OUTPUT);
digitalWrite(A0, HIGH);Is this still in the works or it isn't possible?
Code: Select all
pinMode(A0, OUTPUT);
digitalWrite(A0, HIGH);if you use the right board, it os possible, some boards 37,38 is not breakout for reasonOn the Arduino you can pin map like soSince there are so many analog input pins, it would be good to convert it to a digital pin. I've tried this but it doesn't work for the ESP32.Code: Select all
pinMode(A0, OUTPUT); digitalWrite(A0, HIGH);
Is this still in the works or it isn't possible?
Code: Select all
#include <driver/adc.h>
void setup() {
Serial.begin(115200);
adc1_config_width(ADC_WIDTH_12Bit);
adc1_config_channel_atten(ADC1_CHANNEL_1, ADC_ATTEN_6db);//channel_1 for GPIO37 and 2 for 38.
}
void loop() {
int value = adc1_get_voltage(ADC1_CHANNEL_1);
Serial.println(value);
delay(1000);
}

Users browsing this forum: ChatGPT-User and 2 guests