Yun analogRead() gives diffrent value than leonardo and UNO analogRead()


hi

im running simple code check ph , orp on uno board , run
now got new yun , numbers im getting different leonard , uno numbes

as far know yun should work same other board analogread() dose ?
 
this code:

code: [select]


#include <onewire.h>


delay(1000); //just here slow down output easier read
   analogread(a0);     // ph level equation
   
    float phprobe = analogread(a0);     // ph level equation
    float phlevel = (0.0178 * (phprobe) - 1.889);  //phprobe -26  //-14
    float hot_ph = -1.9 - (((2.5 - phprobe)/200) / (0.257179 + 0.000941468 * temperature));  // - 1.9
     
       
   serial.println(phlevel);
   serial.println("request sent ph");

 delay(1000); //just here slow down output easier read
    int mv;
    analogread(a1);
    float orpprobe = analogread(a1);
    mv = ((2.5 - orpprobe / 200) / 1.037)* 1000;
   
 
 
serial.println(mv);
serial.println("request sent rox");

[\code]

how differrent 2 numbers?

the arduino yun has issues voltage on pin 5v. provides aroung 4.3 v if powering circuit pin have different reading.


Arduino Forum > Products > Arduino Yún (Moderator: fabioc84) > Yun analogRead() gives diffrent value than leonardo and UNO analogRead()


arduino

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code