Guest User

Untitled

a guest
Sep 19th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. /*
  2. Arduino
  3.  
  4. Prossess Audio input through a Arduino
  5. */
  6. int outPin = 9; // Speaker connected to digital pin 9
  7. int analogPin = 3; // audio Input connected to analog pin 3
  8. int val = 0; // variable to store the read value
  9.  
  10. void setup()
  11. {
  12. Serial.begin(9600);
  13. pinMode(outPin, OUTPUT); // sets the pin as output
  14. }
  15.  
  16. void loop()
  17. {
  18. val = analogRead(analogPin); // read the input pin
  19. Serial.println(val);
  20. analogWrite(outPin, val); // Output Data
  21. }
Add Comment
Please, Sign In to add comment