Hi there, just got my UDOO Neo Full around last week. I decided to flash Udoobuntu and test out the given sensors. The barometric/temp sensor seems to work fine, but the standalone temperature sensor does not seem to do anything at all. Using i2cdetect, I can see device 0x48, but the lm75 driver does not get loaded, if I do it manually, I still can't read it. I've connected it standalone, or daisy chain it to the other sensor, still the same results. Is there any way I can probe the values directly using i2cget/i2cset from the device? Thanks. udooer@udooneo:~$ sudo i2cdetect -a -y 1 [sudo] password for udooer: 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: 00 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- udooer@udooneo:~$ ls -l /sys/class/i2c-dev/i2c-1/device/ total 0 drwxr-xr-x 4 root root 0 Jan 1 09:00 1-0060 --w------- 1 root root 4096 Jan 1 09:52 delete_device drwxr-xr-x 3 root root 0 Jan 1 09:00 i2c-dev -r--r--r-- 1 root root 4096 Jan 1 09:52 name --w------- 1 root root 4096 Jan 1 09:52 new_device drwxr-xr-x 2 root root 0 Jan 1 09:00 power lrwxrwxrwx 1 root root 0 Jan 1 09:00 subsystem -> ../../../../../../bus/i2c -rw-r--r-- 1 root root 4096 Jan 1 09:00 uevent
Hi, I had the same issue, but reading the docs, I have found that line to enable the temperature sensor : sudo sh -c 'echo lm75 0x48 >/sys/class/i2c-dev/i2c-1/device/new_device' From here : http://www.udoo.org/docs-neo/Hardware_&_Accessories/Bricks_snap_in_sensors.html Hope this help. Romain
Oh man, it's is dark blue! No wonder I missed it! Will try this and report back when I'm home. Thanks Sent from my LG-H815 using Tapatalk
Ok enabling it works for me. But I do have to reenable it everytime afyer reboot. Thanks. Sent from my LG-H815 using Tapatalk
Sure, 1. Add the line into rc.local, or 2. Create an init script for it, or 3. Check if the file you want exists in your script, if not, execute the new_device line in your code (sudo required of course) Sent from my LG-H815 using Tapatalk
Hi, my experience is that it actually works, I tested all its functionalities specified in the datasheet, reading temperature with a LSB of 1/16th of a degree: why, instead, using the method described in the Docs the read value is rounded to half degree? Is it intended?
The sensor works, here is my script to start the temperature sensor and give the output in Fahrenheit. #!/bin/bash if [ ! -f /sys/class/i2c-dev/i2c-1/device/1-0048/temp1_input ]; then echo "Temperature sensor is not initialized." echo "Enter credentials to initialize..." sudo sh -c 'echo lm75 0x48 >/sys/class/i2c-dev/i2c-1/device/new_device' sleep 5 fi if [ ! -f /sys/class/i2c-dev/i2c-1/device/1-0048/temp1_input ]; then echo "Something went wrong and the sensor wasn't initialized." exit else echo "The sensor is initialized!" fi while [ 1 ]; do raw="$(cat /sys/class/i2c-dev/i2c-1/device/1-0048/temp1_input)"; #get raw data from sensor cel=$( echo "9*$raw/5+32000" | bc) #convert raw data from celsius to fahrenheit fah=$( echo "$cel*.001" | bc) #correctly place decimal temp=$( echo $fah | rev | cut -c 3- | rev ) #remove trailing 0s echo "Temperature: $temp F"; sleep 10 done
That's all fine and dandy to get it working after each boot. But how can we have it enabled on boot without entering credentials? I'd like to have the temp sensor enabled by default so if udoo loses power and restarts, cron scripts work without issue. Thanks in advance
As RoughinIT stated before, just add a line to rc.local. so - "sudo nano /etc/rc.local" and add the lines "sleep 1" and then "echo lm75 0x48 >/sys/class/i2c-dev/i2c-1/device/new_device" before the "exit 0" Upon testing this before posting it I found that the 1 second sleep was needed to give everything time.