You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 10 години
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // Simple sine wave test for WM8731 Audio Codec Board
  2. //
  3. // Requires the MikroElektronika Audio Codec board or similar hardware
  4. // http://www.mikroe.com/add-on-boards/audio-voice/audio-codec-proto/
  5. //
  6. // Recommended connections:
  7. //
  8. // Mikroe Teensy 3.1
  9. // ------ ----------
  10. // SCK 9
  11. // MISO 13
  12. // MOSI 22
  13. // ADCL
  14. // DACL 23
  15. // SDA 18
  16. // SCL 19
  17. // 3.3V +3.3V
  18. // GND GND
  19. //
  20. // This example code is in the public domain.
  21. #include <Audio.h>
  22. #include <Wire.h>
  23. #include <SPI.h>
  24. #include <SD.h>
  25. // GUItool: begin automatically generated code
  26. AudioSynthWaveform waveform1; //xy=110,75
  27. AudioOutputI2Sslave i2ss1; //xy=303,78
  28. AudioConnection patchCord1(waveform1, 0, i2ss1, 0);
  29. AudioConnection patchCord2(waveform1, 0, i2ss1, 1);
  30. AudioControlWM8731master wm8731m1; //xy=230,154
  31. // GUItool: end automatically generated code
  32. void setup() {
  33. wm8731m1.enable();
  34. AudioMemory(15);
  35. waveform1.begin(WAVEFORM_SINE);
  36. waveform1.frequency(440);
  37. waveform1.amplitude(0.9);
  38. wm8731m1.volume(0.50);
  39. }
  40. void loop() {
  41. }