EasyManua.ls Logo

DFRobot FIREBEETLE BOARD-ESP32 - Project 7: DAC Output

DFRobot FIREBEETLE BOARD-ESP32
49 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Welcome to DFRobot: www.DFRobot.com.cn 41 / 49
Project7 DAC
Opposite to ADC of Project3, DAC converts digital signal to analog signal. FireBeetle Board-ESP32
integrated two 8-bit DAC passing ways to convert two signals respectively. DAC circuit is
composed of built-in series resistor and a buffer. Moreover, the two independent DAC can be
used as both reference voltage and power supply for other circuits.
The project will explain the way to input trapezium wave with DAC.
Components in need
1 x FireBeetle Board-ESP32
Caution: No need for other sensor.
Enter code
Open Arduino IDE. You would better enter the code manually than open Course-> Item-7 to be
familiar with it.
Sample code:
void setup() {
}
void loop() {
// put your main code here, to run repeatedly:
for(int i=0;i<10;i++){
dacWrite(D2,i*25);
delay(200);