emmanuel63
Well-known member
Hello,
I notice a strange problem.
I have attached a pot to A0. When reading my pot output value, I have noticed there is a lot of noise (+/- 10). When my pot is connected on other analog inputs, I have no noise (I mean no more than +/-1). This happens only when audio shield is active. When it is disable, the is no noise.
Emmanuel
noise on A0 :
no noise on A0
I notice a strange problem.
I have attached a pot to A0. When reading my pot output value, I have noticed there is a lot of noise (+/- 10). When my pot is connected on other analog inputs, I have no noise (I mean no more than +/-1). This happens only when audio shield is active. When it is disable, the is no noise.
Emmanuel
noise on A0 :
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
//// GUItool: begin automatically generated code
AudioSynthWaveform waveform1; //xy=434,340
AudioOutputI2S i2s1; //xy=699.1111450195312,337.888916015625
AudioConnection patchCord1(waveform1, 0, i2s1, 0);
AudioControlSGTL5000 sgtl5000_1; //xy=159.04762649536133,90.31746006011963
//// GUItool: end automatically generated code
void setup() {
sgtl5000_1.enable();
sgtl5000_1.volume(0.2);
AudioMemory(8);
}
void loop() {
int pot0 = analogRead(A0);
Serial.println(pot0);
delay(5);
}
no noise on A0
Code:
//#include <Audio.h>
//#include <Wire.h>
//#include <SPI.h>
//#include <SD.h>
//#include <SerialFlash.h>
//
////// GUItool: begin automatically generated code
//AudioSynthWaveform waveform1; //xy=434,340
//AudioOutputI2S i2s1; //xy=699.1111450195312,337.888916015625
//AudioConnection patchCord1(waveform1, 0, i2s1, 0);
//AudioControlSGTL5000 sgtl5000_1; //xy=159.04762649536133,90.31746006011963
////// GUItool: end automatically generated code
void setup() {
// sgtl5000_1.enable();
// sgtl5000_1.volume(0.2);
// AudioMemory(8);
}
void loop() {
int pot0 = analogRead(A0);
Serial.println(pot0);
delay(5);
}