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.

35 lines
937B

  1. /*
  2. * A simple hardware test which receives audio on the A2 analog pin
  3. * and sends it to the PWM (pin 3) output and DAC (A14 pin) output.
  4. *
  5. * This example code is in the public domain.
  6. */
  7. #include <Audio.h>
  8. #include <Wire.h>
  9. #include <SPI.h>
  10. #include <SD.h>
  11. #include <SerialFlash.h>
  12. // GUItool: begin automatically generated code
  13. AudioInputAnalog adc1; //xy=161,80
  14. AudioOutputAnalog dac1; //xy=329,47
  15. AudioOutputPWM pwm1; //xy=331,125
  16. AudioConnection patchCord1(adc1, dac1);
  17. AudioConnection patchCord2(adc1, pwm1);
  18. // GUItool: end automatically generated code
  19. void setup() {
  20. // Audio connections require memory to work. For more
  21. // detailed information, see the MemoryAndCpuUsage example
  22. AudioMemory(12);
  23. }
  24. void loop() {
  25. // Do nothing here. The Audio flows automatically
  26. // When AudioInputAnalog is running, analogRead() must NOT be used.
  27. }