Hello guys,
I am trying to control my DAC on my ESP32 which is on pins 25, and 26. Unfortunately you can only control the slider using virtual pins so I’m having trouble completing this. Currently what I have together is this (excluding the wifi stuff), however it doesn’t seem to help.
BLYNK_WRITE(V10) {
int pinData = param.asInt();
sigmaDeltaWrite(0, pinData);
}
// sigmaDelta Digital to Analog (DAC) Channel 1
BLYNK_WRITE(V11) {
int pinData = param.asInt();
sigmaDeltaWrite(1, pinData);
}
void setup()
{
// Debug console
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);
// You can also specify server:
//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442);
// Setup physical button pin (active low)
pinMode(btnPin, INPUT_PULLUP);
timer.setInterval(500L, buttonLedWidget);
/* setup ESP32 pin modes */
/* Setup two DAC channels GPIO25=ADC18, GPIO26=ADC19 */
/* setup channel 0 with frequency 312500 Hz */
sigmaDeltaSetup(0, 312500);
//attach pin ADC18/GPIO25 to channel 0
sigmaDeltaAttachPin(28,0);
//initialize channel 0 to off
sigmaDeltaWrite(0, 0);
//setup channel 1 with frequency 312500 Hz
sigmaDeltaSetup(1, 312500);
//attach pin ADC19/GPIO26 to channel 1
sigmaDeltaAttachPin(29,1);
//initialize channel 1 to off
sigmaDeltaWrite(1, 0);
}
Thanks For all the help in advance!