DAC example playing a single tone
Fork of 1620_App_Board_UART_getc by
main.cpp
- Committer:
- eencae
- Date:
- 2017-03-13
- Revision:
- 1:19c0920a6623
- Parent:
- 0:8ccb53688328
File content as of revision 1:19c0920a6623:
/* ELEC1620 Application Board Example Example of the Tone library to interface with the DAC (c) Dr Craig A. Evans, University of Leeds, March 2017 */ #include "mbed.h" #include "Tone.h" Tone dac(p18); int main() { dac.init(); while (1) { for(float f = 100.0; f <=1000.0 ; f += 100.0) { dac.play(f,0.2); wait(0.25); } } }