#include <otAD5664.h> #include <otSerial.h> #include <otTimer.h> #include <otPrintfLite.h> otAD5664 * dac; void setup() { UartEnableSignals(UART0); UartSetBaud(UART0, 115200); setStdout(UART0); // printf output is now directed on UART0 *dac = otAD5664(); dac->init(); } void loop() { dac->write(otAD5664::DAC_0, 1.0f); // Set DAC 0 to 1V dac->write(otAD5664::DAC_1, 2.0f); // Set DAC 1 to 2V dac->write(otAD5664::DAC_2, 3.0f); // Set DAC 2 to 3V dac->write(otAD5664::DAC_3, 4.0f); // Set DAC 3 to 4V HIBE; }