Show Posts
Pages: [1] 2 3 ... 96
1  Using Arduino / Project Guidance / Re: SD Data Logging with High Sampling Rate on: April 14, 2014, 07:21:57 pm
Yup, here it is:

2  Using Arduino / Programming Questions / Re: Help with modulo. 25%10 always rounds off to 6. on: April 13, 2014, 09:59:15 am
Your code works for me and, although it is a bit cumbersome, I don't see how it could produce 26 from 25. It should work for any integer from 0 to 99.
Try this (and notice the code tags):
void processNumber(int number)
  updateDisplay(number % 10,number/10);

3  Using Arduino / Programming Questions / Re: Trying to get handle on reading different types of data from a CSV file... on: April 11, 2014, 08:19:38 pm
If you compare the way ShowFile (which works) and AnalyzeFile (which doesn't work) are written you'll see that the statement:
   ch =;
in AnalyzeFile isn't in the same place as it is in ShowFile. It might explain a lot or at least get you started on the way to fixing things.

4  Using Arduino / Project Guidance / Re: gaining accurate time on time sensitive measurements. on: April 11, 2014, 03:16:52 pm
I'm curious as to why you need to record from a pyranometer and anemometer at 20Hz. Seems fast to me.

For 20Hz, you could use the pulse-per-second signal from the GPS as an interrupt to give an accurate indication of the start of a second, take a reading,  and then use a blink-without-delay type of code to trigger the other 19 readings after that.

5  Using Arduino / Programming Questions / Re: array value changing mysteriously on: April 09, 2014, 09:42:45 am
This is suspect:
          for ( int y = 2; y <=22; y++ ) {
            letterstore [y] = buf [y];
letterstore is declared to be 22 characters but you are storing a value in letterstore[22] which is off the end of the array.
There may be other similar problems.

6  Using Arduino / Programming Questions / Re: String Array Not Working on: April 05, 2014, 09:55:45 pm
Strings are enclosed in double quotes "like this" - not with single quotes.

7  Using Arduino / Programming Questions / Re: Re-defining a string in array of string on: April 05, 2014, 05:41:02 pm
The problem is that strdup uses malloc to allocate space for the duplicate copy of the string. On a UNO, for example it has a total of 2kB ram which must have space for the stack and local variables. What's left over can be used by malloc but in less than 2kB it will rapidly run out of free memory and start returning NULL.

8  Using Arduino / Programming Questions / Re: Data type comparison on: April 05, 2014, 01:57:40 pm
You are just comparing the addresses of the strings, not their content. You can use strcmp which returns zero if the strings are equal:
  if(strcmp(sms_rx,ON) == 0) {
    // the strings are equal - ON
  } else if (strcmp(sms_rx,OFF) {
    // the strings are equal - OFF
  } else {
    // Neither string is matched
Make sure that sms_rx is null-terminated and also beware of sms_rx having carriage-return and/or linefeed on the end.

9  Using Arduino / Programming Questions / Re: conversion to ppm for methane sensor on: April 04, 2014, 02:52:39 pm
The math looks right.
They might be able to get a better estimate of the high end of the range using a balloon. Put the sensor in the balloon and squeeze the balloon down around the sensor to get all the air out. Attach it to the gas outlet and partially fill the balloon with gas then take a reading. Needless to say - NO SMOKING smiley-twist
That ought to be very close to the top end. It'll probably be quite a bit higher than 690 but they can just plug the new value into the formula to derive k and away they go.

10  Using Arduino / Project Guidance / Re: GPS suggestions? on: April 03, 2014, 07:03:29 pm
In some circumstances, yes. It all depends upon which birds it was seeing when it was shutdown and which birds are visible when it is powered up again.
I have had my Adafruit Ultimate GPS sometimes obtain a lock after 10 seconds when it has been off for several hours - with external antenna connected.

11  Using Arduino / Project Guidance / Re: GPS suggestions? on: April 03, 2014, 11:18:09 am
AFAIK some GPS can do a fast start but they require an upload of an ephemeris of the satellites' orbit from a PC/mobile device. This update is available by subscription but I don't know how much they cost. Uploading the ephemeris means that the GPS receiver does not have to wait until it has downloaded the ephemeris from the satellites thereby speeding up the acquisition of the birds and locking on.
A battery backup, such as in the Adafruit Ultimate GPS, allows retention of the recently received ephemeris but it isn't accurate for very long and may not contain info on all possible satellites. When you start up the GPS a few minutes or hours later the data is still good and the GPS can fix very quickly. Once that data is out of date you have to wait again.

12  Using Arduino / Programming Questions / Re: Floating-point numbers on: April 01, 2014, 08:15:43 pm

13  Using Arduino / Programming Questions / Re: Bug with character arrays on: April 01, 2014, 08:10:45 pm
Looks like txt starts out like this:
txt[0] = '0';
txt[1] = 0;
txt[2] = '1';
txt[3] = '2';
txt[4] = 0;

Nothing wrong with the compiler at all.

14  Topics / Science and Measurement / Re: A/D converter on: April 01, 2014, 04:03:35 pm
Ohhh, I see what you mean now. Yup.

15  Topics / Science and Measurement / Re: A/D converter on: April 01, 2014, 01:17:30 pm
Yes, you would have to calibrate it to know what the fullscale voltage is and adjust the formula accordingly. If it can exceed that, I would submit it hasn't been engineered properly.

Pages: [1] 2 3 ... 96