This is some code that switches a laser and operates a 2 axis galvonometer by using the mpc4822 12-bit SPI DAC with an ESP32. The lasershow.ino file encorporates Ethernet to receive e1.31 sACN data over Ethernet for use in a laser show.
Here's a picture of this used in a miniature laser show. A video can be found here: