Community
cancel
Showing results for 
Search instead for 
Did you mean: 
CSava1
Novice
932 Views

intel edison + arduino board analog readings

Jump to solution

Hello guys,

I wanted to do some analog readings with my Edison and found out that it's reading some values without any inputs in analog pins.

If I read one pin at a time I get 120-123 value in serial monitor.

If I read all the pins at the same time I get 108899589554578 (code below).

int value;

int value1;

int value2;

int value3;

int value4;

int value5;

void setup() {

// put your setup code here, to run once:

Serial.begin(9600);

value = analogRead(A0);

value1 = analogRead(A1);

value2 = analogRead(A2);

value3 = analogRead(A3);

value4 = analogRead(A4);

value5 = analogRead(A5);

}

void loop() {

// put your main code here, to run repeatedly:

Serial.print(value);

Serial.print(value1);

Serial.print(value2);

Serial.print(value3);

Serial.print(value4);

Serial.print(value5);

Serial.println(" ");

}

any idea why it's showing values without any analog input in any analog pin?

thanks

0 Kudos
1 Solution
Pablo_M_Intel
Employee
66 Views

Hi Cristi_Sava,

It seems like your inputs are undefined. By adding a signal to read or a pull up/down resistor I believe this behavior should stop. Have you tried adding a signal to any of the pins? The large number that you're getting is just the read from each of the channels put together. I would suggest you to try with a 'real' signal, so we can see what you get.

Regards,

PabloM_Intel

View solution in original post

1 Reply
Pablo_M_Intel
Employee
67 Views

Hi Cristi_Sava,

It seems like your inputs are undefined. By adding a signal to read or a pull up/down resistor I believe this behavior should stop. Have you tried adding a signal to any of the pins? The large number that you're getting is just the read from each of the channels put together. I would suggest you to try with a 'real' signal, so we can see what you get.

Regards,

PabloM_Intel

View solution in original post

Reply