Sabtu, 17 Januari 2015

Bristol Digest, Vol 585, Issue 7

Send Bristol mailing list submissions to
bristol@mailman.lug.org.uk

To subscribe or unsubscribe via the World Wide Web, visit
https://mailman.lug.org.uk/mailman/listinfo/bristol
or, via email, send a message with subject or body 'help' to
bristol-request@mailman.lug.org.uk

You can reach the person managing the list at
bristol-owner@mailman.lug.org.uk

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Bristol digest..."


Today's Topics:

1. Re: Processors (Nigel Sollars)
2. Re: Processors (Per B?rjesson)
3. Simple script query (DHT11 Sensor) (Peter Hemmings)
4. Re: Simple script query (DHT11 Sensor) (Alex Butcher (LUG))


----------------------------------------------------------------------

Message: 1
Date: Fri, 16 Jan 2015 10:34:36 -0500
From: Nigel Sollars <nsollars@gmail.com>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Processors
Message-ID:
<CAG6aBkWTvCSMvjfnAUTNcN4R2ZoorkuY-cgKEy6QMBBmjwuktA@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Interesting,

I was looking at putting a 2U unit together using a Tyan dual socket MB. I
am leaning towards 2 x 10 cores, my main interest for these ( Other than
no of core's / speed) was the all important VT(x) extensions, As I am
looking at running the latest Xen Server Software on the system.

Just my 10c's

Nige

On Fri, Jan 16, 2015 at 6:33 AM, Shane McEwan <shane@mcewan.id.au> wrote:

> On 15/01/15 20:53, Martin Moore wrote:
> > I?m speccing some new servers and checking the existing ones they report
> > 8 Xeon processors.
> >
> >
> >
> > As far as I can find out, Xeon?s have up to 4 cores ? am I right in
> > thinking they have 2 physical 4 core processors?
>
> Xeons can have more than 4 cores. I think 12 is the current limit? Big
> bikkies! The latest HP Proliant servers I have are dual-hex-core with
> hyperthreading: 2 sockets, 6 cores per socket, 2 threads per core giving
> a total of 24 "CPUs".
>
> Architecture: x86_64
> CPU op-mode(s): 32-bit, 64-bit
> Byte Order: Little Endian
> CPU(s): 24
> On-line CPU(s) list: 0-23
> Thread(s) per core: 2
> Core(s) per socket: 6
> Socket(s): 2
> NUMA node(s): 2
> Vendor ID: GenuineIntel
> CPU family: 6
> Model: 62
> Stepping: 4
> CPU MHz: 1200.000
> BogoMIPS: 5189.17
> Virtualisation: VT-x
> L1d cache: 32K
> L1i cache: 32K
> L2 cache: 256K
> L3 cache: 15360K
> NUMA node0 CPU(s): 0-5,12-17
> NUMA node1 CPU(s): 6-11,18-23
>
> Shane.
>
> _______________________________________________
> Bristol mailing list
> Bristol@mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/bristol
>



--
?Science is a differential equation. Religion is a boundary condition.?

Alan Turing
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.lug.org.uk/mailman/private/bristol/attachments/20150116/e33e0e38/attachment-0001.html>

------------------------------

Message: 2
Date: Fri, 16 Jan 2015 20:06:00 +0100
From: Per B?rjesson <qso@bredband.net>
To: bristol@mailman.lug.org.uk
Subject: Re: [bristol] Processors
Message-ID: <54B96118.8020707@bredband.net>
Content-Type: text/plain; charset=ISO-8859-1

On 2015-01-16 16:34, Nigel Sollars wrote:
> Interesting,
>
> I was looking at putting a 2U unit together using a Tyan dual socket MB. I am leaning towards 2 x 10 cores, my main interest for these ( Other than no of core's / speed) was the all important VT(x) extensions, As I am looking at running the latest Xen Server Software on the system.


My God!! That could be 2x36 Penguins at BOOT. And on a new 40" 4K display ;) ;) ;)


Regards
Per





------------------------------

Message: 3
Date: Sat, 17 Jan 2015 11:44:42 +0000
From: Peter Hemmings <peter@hemmings.eclipse.co.uk>
To: bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: [bristol] Simple script query (DHT11 Sensor)
Message-ID: <54BA4B2A.80905@hemmings.eclipse.co.uk>
Content-Type: text/plain; charset=utf-8; format=flowed

Hi,

I have been doing some final tweaking with my little project and noticed
the temperature was reading about 2.7 degrees high so I wanted to reduce
the reading to improve accuracy.

I found some information and added a "#define TEMP_OFFSET -3" and a
dht11_val[2]+ TEMP_OFFSET" which worked OK, but putting -2.7 produces a
long decimal less than 1.
I also tried to add -7 to the "val[3] but that did not work either.

With the script in its present form is it possible to reduce the output
temperature reading by less than a degree if so, a pointer would be
welcome!?

FYI the val[2] and val[3] are the two temperatures (integer and decimal).

References:

http://www.rpiblog.com/2012/11/interfacing-temperature-and-humidity.html
http://www.rpiblog.com/2012/11/interfacing-temperature-and-humidity.html

This is my modified dht11.c that works:

#include <wiringPi.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#define MAX_TIME 85
#define DHT11PIN 7
#define ATTEMPTS 5
#define TEMP_OFFSET -2
int dht11_val[5]={0,0,0,0,0};

int dht11_read_val()
{
uint8_t lststate=HIGH;
uint8_t counter=0;
uint8_t j=0,i;
for(i=0;i<5;i++)
dht11_val[i]=0;
pinMode(DHT11PIN,OUTPUT);
digitalWrite(DHT11PIN,LOW);
delay(18);
digitalWrite(DHT11PIN,HIGH);
delayMicroseconds(40);
pinMode(DHT11PIN,INPUT);
for(i=0;i<MAX_TIME;i++)
{
counter=0;
while(digitalRead(DHT11PIN)==lststate){
counter++;
delayMicroseconds(1);
if(counter==255)
break;
}
lststate=digitalRead(DHT11PIN);
if(counter==255)
break;
// top 3 transistions are ignored
if((i>=4)&&(i%2==0)){
dht11_val[j/8]<<=1;
if(counter>16)
dht11_val[j/8]|=1;
j++;
}
}
// verify checksum and print the verified data

if((j>=40)&&(dht11_val[4]==((dht11_val[0]+dht11_val[1]+dht11_val[2]+dht11_val[3])&
0xFF)))
{
printf("%d.%d,%d.%d\n",dht11_val[0],dht11_val[1],dht11_val[2]+
TEMP_OFFSET,dht11_val[3]);
return 1;
}
else
return 0;
}

int main(void)
{
int attempts=ATTEMPTS;
if(wiringPiSetup()==-1)
exit(1);
while(attempts)
{
int success = dht11_read_val();
if (success) {
break;
}
attempts--;
delay(500);
}
return 0;
}


(I know there maybe better options with other sensors but it was for a
bit of education in scripting)

Regards

--
Peter H



------------------------------

Message: 4
Date: Sat, 17 Jan 2015 11:51:07 +0000
From: "Alex Butcher (LUG)" <lug@assursys.co.uk>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>,
Peter Hemmings <peter@hemmings.eclipse.co.uk>, bristol and Bath Linux
User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Simple script query (DHT11 Sensor)
Message-ID: <DCE28A97-53E5-49A0-81AA-FCF99716F83C@assursys.co.uk>
Content-Type: text/plain; charset="utf-8"

As it is, that C source is using integer arithmetic, so it'll need a littlebit of reworking to use float or double types for the temperature instead.

Personally, I'd just go with -3.

On 17 January 2015 11:44:42 GMT+00:00, Peter Hemmings <peter@hemmings.eclipse.co.uk> wrote:
>Hi,
>
>I have been doing some final tweaking with my little project and
>noticed
>the temperature was reading about 2.7 degrees high so I wanted to
>reduce
>the reading to improve accuracy.
>
>I found some information and added a "#define TEMP_OFFSET -3" and a
>dht11_val[2]+ TEMP_OFFSET" which worked OK, but putting -2.7 produces
>a
>long decimal less than 1.
>I also tried to add -7 to the "val[3] but that did not work either.
>
>With the script in its present form is it possible to reduce the output
>
>temperature reading by less than a degree if so, a pointer would be
>welcome!?
>
>FYI the val[2] and val[3] are the two temperatures (integer and
>decimal).
>
>References:
>
>http://www.rpiblog.com/2012/11/interfacing-temperature-and-humidity.html
>http://www.rpiblog.com/2012/11/interfacing-temperature-and-humidity.html
>
>This is my modified dht11.c that works:
>
>#include <wiringPi.h>
>#include <stdio.h>
>#include <stdlib.h>
>#include <stdint.h>
>#define MAX_TIME 85
>#define DHT11PIN 7
>#define ATTEMPTS 5
>#define TEMP_OFFSET -2
>int dht11_val[5]={0,0,0,0,0};
>
>int dht11_read_val()
>{
> uint8_t lststate=HIGH;
> uint8_t counter=0;
> uint8_t j=0,i;
> for(i=0;i<5;i++)
> dht11_val[i]=0;
> pinMode(DHT11PIN,OUTPUT);
> digitalWrite(DHT11PIN,LOW);
> delay(18);
> digitalWrite(DHT11PIN,HIGH);
> delayMicroseconds(40);
> pinMode(DHT11PIN,INPUT);
> for(i=0;i<MAX_TIME;i++)
> {
> counter=0;
> while(digitalRead(DHT11PIN)==lststate){
> counter++;
> delayMicroseconds(1);
> if(counter==255)
> break;
> }
> lststate=digitalRead(DHT11PIN);
> if(counter==255)
> break;
> // top 3 transistions are ignored
> if((i>=4)&&(i%2==0)){
> dht11_val[j/8]<<=1;
> if(counter>16)
> dht11_val[j/8]|=1;
> j++;
> }
> }
> // verify checksum and print the verified data
>
>if((j>=40)&&(dht11_val[4]==((dht11_val[0]+dht11_val[1]+dht11_val[2]+dht11_val[3])&
>
>0xFF)))
> {
> printf("%d.%d,%d.%d\n",dht11_val[0],dht11_val[1],dht11_val[2]+
>TEMP_OFFSET,dht11_val[3]);
> return 1;
> }
> else
> return 0;
>}
>
>int main(void)
>{
> int attempts=ATTEMPTS;
> if(wiringPiSetup()==-1)
> exit(1);
> while(attempts)
> {
> int success = dht11_read_val();
> if (success) {
> break;
> }
> attempts--;
> delay(500);
> }
> return 0;
>}
>
>
>(I know there maybe better options with other sensors but it was for a
>bit of education in scripting)
>
>Regards
>
>--
>Peter H
>
>_______________________________________________
>Bristol mailing list
>Bristol@mailman.lug.org.uk
>https://mailman.lug.org.uk/mailman/listinfo/bristol

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.lug.org.uk/mailman/private/bristol/attachments/20150117/bcaa519e/attachment-0001.html>

------------------------------

_______________________________________________
Bristol mailing list
Bristol@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/bristol

End of Bristol Digest, Vol 585, Issue 7
***************************************

Tidak ada komentar:

Posting Komentar