Grove shield

Discussion in 'Troubleshooting' started by m3m3nto, Mar 22, 2014.

  1. m3m3nto

    m3m3nto New Member

    Joined:
    Mar 6, 2014
    Messages:
    4
    Likes Received:
    0
    Hy guys,
    I'm trying to use my Grove Shield (v 1.2) with Udoo.
    Looking at this tutorial it should be really simple:

    http://www.udoo.org/starter-kit-grove-p ... sy-making/

    but i'm unable to read analog sensor values from, for example, a termistore:

    Code:
    int a;
    int del=2000; // duration between temperature readings
    float ctemperature;
    int B=3975; 
    float resistance;
    
    void setup()
    {
      Serial.begin(9600);
      Serial.println("Temperature");
    }
    
    void loop()
    {
      a=analogRead(0);
      resistance=(float)(1023-a)*10000/a; 
      ctemperature=1/(log(resistance/10000)/B+1/298.15)-273.15;
      Serial.print(ctemperature);
      Serial.println(" C");
      delay(del);
    }
    The termistore is connected to Grove shield analog port 0 (A0).
    Looking at the serial Monitor I can find only "Temperature", then the sketch hangs on.
    Someone can help me?
    Thank you, bye!!
     
  2. mkopack

    mkopack Member

    Joined:
    Jun 14, 2013
    Messages:
    451
    Likes Received:
    21
    There's been some known issues with analog input, caused by the compiler. The Udoo guys are working on it. that MIGHT be the issue here.
     
  3. delba

    delba Administrator Staff Member

    Joined:
    May 8, 2013
    Messages:
    1,064
    Likes Received:
    9
  4. m3m3nto

    m3m3nto New Member

    Joined:
    Mar 6, 2014
    Messages:
    4
    Likes Received:
    0
  5. delba

    delba Administrator Staff Member

    Joined:
    May 8, 2013
    Messages:
    1,064
    Likes Received:
    9
    ok let me know.
     
  6. m3m3nto

    m3m3nto New Member

    Joined:
    Mar 6, 2014
    Messages:
    4
    Likes Received:
    0
  7. delba

    delba Administrator Staff Member

    Joined:
    May 8, 2013
    Messages:
    1,064
    Likes Received:
    9

Share This Page