Show Posts
Pages: 1 ... 464 465 [466] 467 468 ... 922
6976  Community / Exhibition / Gallery / Re: Humidex (Heat Index) Calculator on: May 27, 2012, 12:30:00 pm
Quote
Will the same library work for the DHT22 as well
The DHT22 handshake is identical but the interpretation of the dataformat is different.
Try this lib - http://arduino.cc/playground/Main/DHTLib -

Quote
very unreliable (read inaccurate)
The DHT11 / 22 need time between readings (2 seconds) and in the datasheet there is a separate chapter about (re)calibration.

For temperature I prefer the DS18B20 as you can use multiple of them on one pin.
6977  Community / Bar Sport / Re: project evolution timelapse on: May 27, 2012, 11:49:52 am

looks good,

convert the animated gif to an mpeg somehow to minimize size?
6978  Community / Exhibition / Gallery / Re: Humidex (Heat Index) Calculator on: May 27, 2012, 11:32:36 am
interesting, didn't know this humidex index and a quick google brought up this graph - http://www.ccacac.com/wp-content/uploads/2010/06/Humidex-Graph.pdf -

dewpoint I know and I have written code for it in - http://arduino.cc/playground/Main/DHT11Lib -

I like to add this humidex & heat index code to this lib too

refactored the humidex in two steps:
Code:
double humidex(double tempC, double DewPoint)
{
  double e = 5417.7530*((1/273.16)-(1/(273.16 + DewPoint)));
  double h = tempC + 0.5555 * ( 6.11 *  exp (e) - 10);
  return h;
}

=>

double humidex(double tempC, double DewPoint)
{
  double e = 19.833625 - 5417.753 /(273.16 + DewPoint);
  double h = tempC + 3.3941 * exp(e) - 5.555;
  return h;
}


A quick try for the heatIndex -> note the temp is in Fahrenheit
(code not tried)
Code:
// http://en.wikipedia.org/wiki/Heat_index
double heatIndex(double tempF, double humidity)
{
  double c1 = -42.38, c2 = 2.049, c3 = 10.14, c4 = -0.2248, c5= -6.838e-3, c6=-5.482e-2, c7=1.228e-3, c8=8.528e-4, c9=-1.99e-6 ;
  double T = tempF;
  double R = humidity;
  double T2 = T*T;
  double R2 = R*R;
  double TR = T*R;

  double rv = c1 + c2*T + c3*R + c4*T*R + c5*T2 + c6*R2 + c7*T*TR + c8*TR*R + c9*T2*R2;
  return rv;
}

==>

double heatIndex(double tempF, double humidity)
{
  double c1 = -42.38, c2 = 2.049, c3 = 10.14, c4 = -0.2248, c5= -6.838e-3, c6=-5.482e-2, c7=1.228e-3, c8=8.528e-4, c9=-1.99e-6  ;
  double T = tempF;
  double R = humidity;

  double A = (( c5 * T) + c2) * T + c1;
  double B = ((c7 * T) + c4) * T + c3;
  double C = ((c9 * T) + c8) * T + c6;

  double rv = (C * R + B) * R + A;
  return rv;
}
// from 15 float multiplies to 8 float multiplies.

I assume that by only using the c1..c4 one can get a real fast (1st order) approximation
6979  Using Arduino / General Electronics / Re: Ping sensor help on: May 27, 2012, 10:25:01 am

Tim has written a nice pibg lib here - http://arduino.cc/forum/index.php/topic,106043.0.html -
6980  Using Arduino / Project Guidance / Re: DHT11 + LCD weather station on: May 27, 2012, 10:22:29 am
thanks,

sometimes code contains parts that resemble smileys like this one   

if (x == smiley-cool
{
  bool b smiley-cry a & b );
}

Code:
if (x == 8)
{
  bool b =( a & b );
}
6981  Community / Bar Sport / Re: A talk on advertising. on: May 27, 2012, 10:15:56 am

On the other hand I love the creativity of some commercials like this one -

6982  Community / Website and Forum / Re: Obvious question on: May 27, 2012, 10:06:22 am

There is this link -  http://arduino.cc/forum/index.php?action=unread -
6983  Using Arduino / Project Guidance / Re: DHT11 + LCD weather station on: May 27, 2012, 10:02:42 am

please please please use the # button when posting code, it provides tags to present the code in a better readable format.

- you can modify old posts easily, select the code part and press the # button just above the smileys smiley

Thank you..
6984  Using Arduino / Programming Questions / Re: pulseIn always returns 0 on: May 27, 2012, 09:59:39 am
which version of the IDE are you using?

There was a bug that caused the pulsIn() code to premature timeout, see - http://arduino.cc/forum/index.php/topic,74813.0.html -
it should be fixed in the 1.0.1. version.

6985  Using Arduino / Programming Questions / Re: Need someones help shorten the code i wrote. on: May 27, 2012, 09:52:31 am

The refence section of arduino.cc explains quite a lot of comon programming constructs.

furthermore a good book is about programming is - http://zanasi.chem.unisa.it/download/C.pdf - a must buy book BTW
6986  Using Arduino / Programming Questions / Re: How to change compiler switches? on: May 27, 2012, 09:46:21 am

ultimately you could write a wrapper (e.g. in C#)  that intercepts the avrgcc call and replaces the params with those of your choice....
6987  Using Arduino / Programming Questions / Re: assembler? on: May 27, 2012, 09:25:20 am

A way to learn assembler is often to use the dissassembler, in the distribution of the Arduino there is one called objdump.exe, IIRC you need the -D flag.

gives you C code mixed with assembly, maybe not optimized but allways a starting point.

6988  Using Arduino / Project Guidance / Re: Musical Staircase on: May 27, 2012, 09:19:32 am

you mean something like this  - -
6989  Using Arduino / Project Guidance / Re: CAR HACK: CAN-BUS Shield OBD + Arduino UNO R3 on: May 27, 2012, 09:18:33 am

the proof it CAN(BUS) be done - -

you may need to update / downgrade the SD class ...
6990  Using Arduino / Project Guidance / Re: DHT11 + LCD weather station on: May 27, 2012, 09:16:38 am
Quote
display DHT11 readings on the LCD and get readings to computer at the same time

How is the computer connected to the Arduino?
What software captures the data from Arduino?

If it is the serial monitor of the IDE a statement like Serial.println(reading); in the right place should be enough

BTW there are many DHT 11 sketches on this forum, you can search for them in the upper right corner but be patient as it is not that fast.

Pages: 1 ... 464 465 [466] 467 468 ... 922