Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //this will be our analog value for the audio input
- int audVal;
- //this is the analog pin we are reading values from (0 is A0)
- const int audPin = 0;
- void setup() {
- // put your setup code here, to run once:
- //let's establish communication with all of
- //our computer programs on the 9600 "channel"
- Serial.begin(9600);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- //set audVal equal to the analog value from audPin
- audVal = analogRead(audPin);
- //let's tell the computer programs the audio value from audPin
- Serial.println(audVal);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement