How to connect Barometric and Temperature sensors?

Discussion in 'UDOO NEO' started by Vinz87, Nov 11, 2015.

  1. Vinz87

    Vinz87 UDOOer

    Joined:
    Nov 11, 2015
    Messages:
    105
    Likes Received:
    19
    Very dumb question sorry, but where do you connect external sensors like the barometer and temperature sensors shipped with the Kickstarter kit?
     
  2. montella

    montella New Member

    Joined:
    Sep 6, 2014
    Messages:
    15
    Likes Received:
    4
    Looking the board in the way the leds are in the upper right corner, the i2c socket is exactly between the network connector and the leds.
    Insert the cable with the red alined with the outer border of the Udoo Neo.
    Plug in softly.
    The other end of the cable have to be plugged in the sensor "IN" connector.
    The label "In" is close to the sensor name on the sensor board.
    The barometric sensor is bot temperature and air pressure (I found the value have to be multiplied per 10 more then the scale value).
    Unfortunately my tries to use the Temperature sensor were with no success.
    Apparently the kernel module is not loaded with an error and (obviously) no device is attached on
    /sys/class/i2c-dev/i2c-1/device/1-0048/

    Any suggestion?
    -- Raffaele
     
  3. Vinz87

    Vinz87 UDOOer

    Joined:
    Nov 11, 2015
    Messages:
    105
    Likes Received:
    19
    Well I don't have the board in my hands right now, but I remember I noticed the cables provided with the two sensors have two differently shaped ends: one with 5 holes and one with 6 holes. Instead, the I2C sockets on both the sensors and the board are made of 5 holes, so there was one end of the cable that couldn't be plugged anywhere.
    This is not your case? Did your sensors have been shippend with cables with identical ends?
     
  4. rreignier

    rreignier New Member

    Joined:
    Nov 7, 2015
    Messages:
    8
    Likes Received:
    3
    Hi Vinz87,
    The Udoo Neo connector for the sensors has 5 pins but the "bricks" (sensor boards) have one 5-Pin socket and one 6-Pin socket. So the cables have different ends.
    Romain
     
  5. Andriy

    Andriy Member

    Joined:
    Nov 10, 2015
    Messages:
    30
    Likes Received:
    2
    Hi
    How to start the script (or program) for obtaining data with sensors?
     
  6. RoughingIT

    RoughingIT New Member

    Joined:
    Nov 11, 2015
    Messages:
    11
    Likes Received:
    4
  7. Andriy

    Andriy Member

    Joined:
    Nov 10, 2015
    Messages:
    30
    Likes Received:
    2
    sudo sh -c 'echo lm75 0x48 >/sys/class/i2c-dev/i2c-1/device/new_device' ---- Permission denied
    how to perform under "root"
     
  8. rreignier

    rreignier New Member

    Joined:
    Nov 7, 2015
    Messages:
    8
    Likes Received:
    3
    That's strange, I did not have that issue.

    Did you boot the board with the sensors already plugged-in ?
     
  9. RoughingIT

    RoughingIT New Member

    Joined:
    Nov 11, 2015
    Messages:
    11
    Likes Received:
    4
    Yes, I did. And it does not work. I'll see what happens after enabling the board.

    Sent from my LG-H815 using Tapatalk
     
  10. RoughingIT

    RoughingIT New Member

    Joined:
    Nov 11, 2015
    Messages:
    11
    Likes Received:
    4
    It looks like I have to enable it every time even after I reboot

    Sent from my LG-H815 using Tapatalk
     
  11. RoughingIT

    RoughingIT New Member

    Joined:
    Nov 11, 2015
    Messages:
    11
    Likes Received:
    4
    Using sudo you are doing it as root. If you want to just go down to the root shell you can run 'sudo -i'

    Sent from my LG-H815 using Tapatalk
     
  12. Andriy

    Andriy Member

    Joined:
    Nov 10, 2015
    Messages:
    30
    Likes Received:
    2
  13. mparkes

    mparkes New Member

    Joined:
    Nov 20, 2015
    Messages:
    5
    Likes Received:
    3
    I can confirm, looks like have to enable them with each fresh boot.

    Anyone have a fix?

    Sent from my Nexus 6P using Tapatalk
     
  14. mparkes

    mparkes New Member

    Joined:
    Nov 20, 2015
    Messages:
    5
    Likes Received:
    3
  15. Andriy

    Andriy Member

    Joined:
    Nov 10, 2015
    Messages:
    30
    Likes Received:
    2
    PL3115A2 - Barometer pressure always- value 99.14-99.15 Why? Its kPa?
    how to translate in millimeters of mercury?
    Value * 7.5006375541921 mmHg?
    How to write the result of script to a file?
    (script)
    #!/bin/bash while [ 1 ]; do echo -n 'temp: ' TEMP_RAW=`cat /sys/class/i2c-dev/i2c-1/device/1-0060/iio\:device0/in_temp_raw` TEMP_SCALE=`cat /sys/class/i2c-dev/i2c-1/device/1-0060/iio\:device0/in_temp_scale` python << EOF print( $TEMP_RAW * $TEMP_SCALE ) EOF echo -n 'pressure: ' PRES_RAW=`cat /sys/class/i2c-dev/i2c-1/device/1-0060/iio\:device0/in_pressure_raw` PRES_SCALE=`cat /sys/class/i2c-dev/i2c-1/device/1-0060/iio\:device0/in_pressure_scale` python << EOF print( $PRES_RAW * $PRES_SCALE ) EOF done
     
    Last edited: Jan 2, 2016
  16. Andriy

    Andriy Member

    Joined:
    Nov 10, 2015
    Messages:
    30
    Likes Received:
    2
    How read Barometric and Temperature sensors using Arduino IDE?
     
  17. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    Dear Andridy,
    have you read the docs? If there is something that is not clear in the docs, please tell me but be more specific
     
  18. Andriy

    Andriy Member

    Joined:
    Nov 10, 2015
    Messages:
    30
    Likes Received:
    2
    Thanks for answer, but i not andestend haw read from Arduino IDE (what kind of skatch?)
    In the docs, present script only for work from terminal.
     
  19. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    I suggest you to try doing it in from the terminal, it's the easier way. Otherwise you would need a program that reads those values for you. The terminal may frighten a bit at the beginning, I see, but don't throw in the towel before the bell rings!
     
  20. Andriy

    Andriy Member

    Joined:
    Nov 10, 2015
    Messages:
    30
    Likes Received:
    2
    How save data form terminal in file?
     

Share This Page