Go Down

Topic: Bizarre wave with no input (Read 624 times) previous topic - next topic


Apr 17, 2016, 09:42 am Last Edit: Apr 17, 2016, 09:58 am by 12Mari0
I'm using an older Arduino Eleven (works the same as Uno), and I'm trying to get a sound input from a tablet. I'm using an AUX cable with an alligator clip on the tip, connecting it through a jumper wire to the analog pin 0, but even when nothing's connected to the cable on the non-Arduino end, I'm geting a wave going from 0 to 1023 that doesn't seem to change at all...

The code I'm using to test is:
Code: [Select]
int sound = 0;

void setup() {

void loop() {
sound = analogRead(0);

Can someone please tell me what I'm doing wrong? I apologise if this is in the wrong section. Thanks!


Apr 17, 2016, 05:17 pm Last Edit: Apr 17, 2016, 05:18 pm by jremington
Probably, 50/60 Hz AC noise. Connect the input to ground and it will go away.

Go Up