DFRobot FIREBEETLE BOARD-ESP32 User Manual page 42

Table of Contents

Advertisement

Welcome to DFRobot: www.DFRobot.com.cn
}
for(int j=10;j>0;j--){
dacWrite(D2,j*25);
delay(200);
}
}
Please click
verify/compile
Once you click Upload, IDE will send codes to FireBeetle Board-ESP32.
Once the upload finishes, use an oscilloscope to test the voltage of D2, trapezium wave shown as
below.
Code analysis:
As we see, the operation of DAC in Arduino is convenient, just call dacWrite. The antitype of
dacWrite is as below:
void
dacWrite(uint8_t pin, uint8_t value)
Pin is the digital output interface of DAC, D2/D3; Value is the output number, from 0 to 255, the
corresponding voltage value is 0 to Vcc.
to review and please upload it after the confirmation.
42 / 49

Advertisement

Table of Contents
loading

Related Products for DFRobot FIREBEETLE BOARD-ESP32

Table of Contents