Go to advanced search

by Troels
Wed Jan 08, 2014 2:14 pm
Forum: Other programming languages
Topic: DS18B20 2 decimals
Replies: 9
Views: 1772

Re: DS18B20 2 decimals

AndyD wrote:No problems. You could replace the two sed commands with perl as well if you wanted.
Would it be more efficient / simple?
by Troels
Wed Jan 08, 2014 10:03 am
Forum: Other programming languages
Topic: DS18B20 2 decimals
Replies: 9
Views: 1772

Re: DS18B20 2 decimals

You could use perl. Something like:- ude_temp="$( cat /sys/bus/w1/devices/28-0000056xxxba/w1_slave | sed -n 's/^.*\(t=[^ ]*\).*/\1/p' | sed 's/t=//' | perl -ne 'printf "%.3f", $_/1000;')" Perl has a printf function similar to the C programming language. perl -ne 'printf "%.3f", $_/1000;' reads real...
by Troels
Wed Jan 08, 2014 8:18 am
Forum: Other programming languages
Topic: DS18B20 2 decimals
Replies: 9
Views: 1772

Re: DS18B20 2 decimals

rpdom wrote:Try this

Code: Select all

cat /sys/bus/w1/devices/28-0000057b716b/w1_slave | sed -n 's/^.*t=\([0-9]*\)\([0-9][0-9]\)[0-9]$/\1.\2/p'
I have tested it now, but it only work if t= to a 4 digital number like 8375, not -8375, 83, 8 and so on... Any way to fix that?
by Troels
Wed Jan 08, 2014 6:53 am
Forum: Other programming languages
Topic: DS18B20 2 decimals
Replies: 9
Views: 1772

DS18B20 2 decimals

Hi I'm using this code i a sh file: ude_temp="$( cat /sys/bus/w1/devices/28-0000056xxxba/w1_slave | sed -n 's/^.*\(t=[^ ]*\).*/\1/p' | sed 's/t=//' | awk '{x=$1}END{print(x/1000)}')" echo $ude_temp This will echo the temperatur like this (left row): 25.0625 --> 25.06 10.125 --> 10.13 0.5 --> 0.50 0 ...
by Troels
Mon Sep 30, 2013 12:45 pm
Forum: Raspbian
Topic: Oracle Java default
Replies: 2
Views: 540

Re: Oracle Java default

cjan wrote:yes.
Thanks
by Troels
Mon Sep 30, 2013 11:25 am
Forum: Raspbian
Topic: Oracle Java default
Replies: 2
Views: 540

Oracle Java default

Is the new Hard float version of Oracle Java installed by default in: 2013-09-25-wheezy-raspbian.zip :?:
by Troels
Fri Aug 23, 2013 9:01 am
Forum: Debian
Topic: No more updates for Debian Wheezy (Soft-float)?
Replies: 6
Views: 3404

Re: No more updates for Debian Wheezy (Soft-float)?

Thanks joan

I leave it as it is, my pi runs perfectly so there is no reason for me to risk anything ;)
by Troels
Fri Aug 23, 2013 8:40 am
Forum: Debian
Topic: No more updates for Debian Wheezy (Soft-float)?
Replies: 6
Views: 3404

Re: No more updates for Debian Wheezy (Soft-float)?

7.1 is an odd entry. I'd expect a version name in that file. My /etc/apt/sources.list contains deb http://http.debian.net/debian testing main contrib non-free deb-src http://http.debian.net/debian testing main contrib non-free deb http://www.deb-multimedia.org testing main OK, in the source list I ...
by Troels
Fri Aug 23, 2013 8:23 am
Forum: Debian
Topic: No more updates for Debian Wheezy (Soft-float)?
Replies: 6
Views: 3404

Re: No more updates for Debian Wheezy (Soft-float)?

joan wrote:You may be tracking the stable release which may not have had recent changes (stable only gets security fixes). I'm tracking the testing release (jessie/sid) which has regular updates.

What is reported by?

cat /etc/debian_version
7.1
by Troels
Fri Aug 23, 2013 8:10 am
Forum: Debian
Topic: No more updates for Debian Wheezy (Soft-float)?
Replies: 6
Views: 3404

No more updates for Debian Wheezy (Soft-float)?

Hi

I the last 3-4 weeks when I run:

sudo apt-get update
and
sudo apt-get dist-upgrade

I get this message every time:
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Have there been any updates in the past 3-4 weeks or is there something wrong with my installlation?
by Troels
Wed Mar 06, 2013 9:59 am
Forum: Troubleshooting
Topic: Chromium browser "Segmentation Fault" on Debian soft wheezy
Replies: 14
Views: 5895

Re: Chromium browser "Segmentation Fault" on Debian soft whe

I have the same problem as you, does anyone have a working chromium running on Debian Soft Wheezy?
by Troels
Mon Oct 15, 2012 5:28 pm
Forum: General discussion
Topic: RS & Allied Update #4 (10th Oct)
Replies: 184
Views: 29509

Re: RS & Allied Update #4 (10th Oct)

[email protected]

How about 119xxx should they also be despatched by now?

Go to advanced search