Show Posts
Pages: 1 [2] 3 4 ... 13
16  Using Arduino / Programming Questions / Re: Brushless DC motor - Direction Control with one pin? on: March 31, 2014, 10:28:49 am
I would guess there is a reason for using 2 pins because it makes the most sense and it works as oppose to one pin.
17  Using Arduino / Project Guidance / Re: RTC DS-1307 on: March 30, 2014, 11:35:33 am
The time library works together with the rtc. The arduino keeps time but not accurately so it'll look at the rtc every 5 minutes or so to  sync itself. You also don't want to query the rtc every second either. It's a strain on the device so the time library is a happy medium.
18  Using Arduino / Programming Questions / Re: Timeralarm and time libraries on: March 26, 2014, 10:02:00 pm
I believe you just put in the function name in the 2nd param. It cannot have params.
19  Using Arduino / Project Guidance / Re: research project on: March 26, 2014, 12:34:50 pm
If you're interested in AI, the arduino shouldn't be used for the brain, most likely just a supporting device to gather inputs or control devices. You need a full computer for heavy computations in AI.
20  Topics / Science and Measurement / Re: CO2 ppmv & ppmw math on: March 25, 2014, 05:14:42 pm
The wiki page on Henry's Law says that the law does not apply when the gas reacts chemically with the solvent and gives the specific example of carbon dioxide and water which form carbonic acid. So you can't use Henry's Law.


21  Topics / Science and Measurement / Re: CO2 ppmv & ppmw math on: March 25, 2014, 04:34:07 pm
Henry's law has some to do with finding the concentration of a gas in water based on the amount of the gas bouncing out of the water i.e. gas concentration above the water.
The math for it is super complicated.

But In my wiki search I thought I found the constant 0.8317 is good enough for CO2, assuming normal water density (not salt water etc) and temp of 70F.'s_law

ppm is parts per million or
ppm(volume) = mg/L
ppm(weight) = molar weight/1000 kg/m^3

1000 kg/m^3 is the density of water and can be substituted with 1000000 mg/L to get the formula simplified.

for my thought to get the weight of it would be
co2_weight = co2_volume/1000000 * .8317 (henry's) * 44.01 (mole weight of CO2) / 1000000
22  Using Arduino / Programming Questions / Re: returning a value from a function on: March 25, 2014, 04:10:43 pm
this is the proper use for a returned value
void loop()
  Serial.print(" z: ");
  Serial.println( readAccel() );

z is a local variable to readAccel().
you can either print it directly like above or assign it to another variable
int zz = readAccel();
Serial.println( zz );
23  Topics / Science and Measurement / Re: CO2 ppmv & ppmw math on: March 23, 2014, 10:03:32 pm
Co2 is co2. I'm trying to convert ppmv to ppmw like how to convert Celsius to Fahrenheit . Just measurements.
24  Topics / Science and Measurement / CO2 ppmv & ppmw math on: March 23, 2014, 09:31:52 pm
Hi folks.
Anybody here knows CO2 atmospheric math?
I'm using this sensor to measure CO2.
It measures CO2 in ppm by volume aka atmosphere.
What I'm using it for is to measure CO2 concentration in water which is measured in ppm by weight.

This is what I have so far.
double co2 = K_30.getCO2('p') * 3; //returns co2 value in ppm ('p') or percent ('%')
  //there's a glitch sometimes with the sensor output
  if(co2 >= 0 && co2 <= 30000) {
      co2 = co2 * 0.8317 * 44.01 / 10000;
      //  quicker than co2/1000000 * 0.8317 * 44.01 / 1000000
      //  0.8317 accounts for Henry's Law
      // max ppmw will be 36.6 with 10,000 ppmv

The sensor floats on the waterline detecting any CO2 bouncing out of the water. Do I even need to account for Henry's law?
Is the math right?
25  Using Arduino / Programming Questions / Re: Arduino interacting with computer application on: March 23, 2014, 05:19:46 pm
check out
the IDE was built for stuff like this. It's easy to draw shapes and whatnot while listening to the serial port signal from the arduino.
26  Using Arduino / Programming Questions / Re: Making variable accessible with JSON on: March 23, 2014, 10:02:04 am
So do you want the arduino or the webbrowser to parse the json ? The browser can use JavaScript to parse and you have to write something for the arduino to parse the string.
27  Using Arduino / Programming Questions / Re: Need some help with serial port and apple script on: March 20, 2014, 06:17:05 pm
Serial port write "/r/n" to portref
28  Using Arduino / Programming Questions / Re: Program locks computer (DONT RUN) on: March 20, 2014, 05:25:18 pm
try uploading an example like 'blink'.
If blink crashes for computer, something else is going on.
29  Using Arduino / Programming Questions / Re: My alarm clock project is working but at the wrong times on: March 20, 2014, 11:08:29 am
Sorry I forgot to clarify, I'm not using an RTC chip. I'm simply using the Time Alarm and Time libraries for the Uno. But I might consider adjusting the project to include an RTC chip if that's better?

You have to use the RTC. Time kept by the arduino will drift.
The arduino uses the RTC to correct itself every 'x' minutes. You can use your computer time too if it's connected and some app to send the time to the ardiuno.
30  Using Arduino / Programming Questions / Re: Variable variable names for code tidy up? on: March 19, 2014, 02:19:54 pm
It's got arrays. It's crying for a loop.
yeah, you could be right.
Pages: 1 [2] 3 4 ... 13