Show Posts
Pages: 1 ... 247 248 [249] 250 251 ... 747
3721  Using Arduino / Project Guidance / Re: Detecting lean angle on a motorcycle on: August 04, 2013, 06:47:12 am
Thoughts?

Isn't that why bikers have knees?
3722  Using Arduino / Project Guidance / Re: Indoor tracking device on: August 04, 2013, 06:44:06 am
If there are people around the machines you want to track then one option is to install a siren which can be triggered remotely. If you're near by, you may be able to hear it directly. If you aren't, there may be other people nearby who can hear it and contact you to turn that damned noise off. Perhaps you could combine that with some sort of intercom mounted on the vehicle which people could use to contact you. If it worked, this might have a knock-on effect that people would be reluctant to have these machines left in their work area because of the nuisance factor when the siren goes off. That might be a good thing.
3723  Using Arduino / Project Guidance / Re: Ver...y long range communication on: August 04, 2013, 06:35:59 am
You may be overstating the requirements. Do you really need a wireless connection over 200 miles range? I can't see why you would need that unless your woodlands were 200 miles across, which seems unlikely.

Depending what your true requirements are, it may be that you can get away with a wireless connection with a much shorter range to a base station which has internet or phone connectivity (wired/wireless). It would be much easier to achieve this from a fixed base station than from a mobile device because you can use directional antenna to increase the wireless range, even if you can't manage to set up a wired connection. Depending on the size of antenna you're able to use at a base station and the area you need to cover, you may need multiple base stations. However you achieve it, once you have got a path back to a land line or cell tower, the rest is easy.
3724  Using Arduino / Project Guidance / Re: Whistle detection-pressure cooker on: August 04, 2013, 06:27:30 am
It may be that cooking is done differently where you are, but here in the UK when using a pressure cooker (whistling or otherwise) the number of times the pressure cooker "lets off steam" while cooking is irrelevant - once it has built up pressure it will vent any excess pressure as needed, just as a simmering pan produces steam. What is important is how long the contents have been up to temperature, not how many times a valve let off steam along the way.
3725  Using Arduino / Project Guidance / Re: Ethernet with SD card Shield - Compiling larger scripts. on: August 04, 2013, 06:22:06 am
compile scripts to or at least compile a smaller script that can point to the SD card to do the rest

You need to explain what you mean here. My best guess is that you want the web server to be able to serve out javascript files, style sheets, HTML documents and so on that are stored on the SD card. That's certainly feasible and not hard to get working. You would just need to work out the document name that was being requested, map that to a file name on the SD card, read the content of that file and write it out as an HTTP response.

What would be harder is dealing with the many options that HTTP supports for encoding, authentication, and all that other stuff that modern web sites use as a matter of course. You can make a functional web server on an Arduino, but making one that works as well as a modern PC-hosted web site is much harder. For one thing, the Arduino is very slow and extremely limited in the number of connections it can support.

If you want to use a fully featured web site as a front end for your Arduino then IMO you would be better off setting up an external web site that presents the front end, and have that communicate with the back-end Arduino server via a web service, or a serial interface, or any other mechanism you like. It will be much quicker and easier to develop, and it will work better and more reliably.

There's nothing stopping you from trying to implement something similar entirely on the Arduino but it will take a lot more effort and never work as well.
3726  Using Arduino / Programming Questions / Re: Number of digits to print on: August 03, 2013, 05:23:52 pm
Even better safety would be to use snprintf instead of sprintf, which will limit the number of characters it can try and put into the resultant string (snprintf(temp, 5, "%04d", A)smiley-wink

Even better would be to have the size argument be the actual size of the array, and not a hard-coded value that may or may not be correct.
3727  Using Arduino / Project Guidance / Re: Detecting lean angle on a motorcycle on: August 03, 2013, 05:17:02 pm
You cannot measure the lean angle with respect to gravity by measuring the distance to the road, since it's also banked.

Agree with your assessment of the physics, but if you're dealing with typical roads then in my experience local roads are usually not banked significantly and I suspect that it might be possible to get some indication of lean angle.

I can't think why that would be a useful thing to do, though.
3728  Using Arduino / Project Guidance / Re: help on: August 03, 2013, 05:13:38 pm
I think requiring the flow to be constant might be a problem, but if it's sufficient for it to be within some limits that you will set then everything else seems feasible.

The way I'd approach this is to have a variable holding the value of millis() last time the flow was seen to be outside the required limits. Use the technique demonstrated in the blink without delay example sketch to find how long ago that value was updated and hence whether the flow condition has been met for long enough to turn the LED on.

I guess you would also want to turn the LED off as soon as the flow was seen to be outside the required limits.
3729  Using Arduino / Programming Questions / Re: Master and slave RF communication on: August 03, 2013, 09:30:31 am
Code:
  while (Serial.available() > 0) {
    long int x = Serial.parseInt();
    Serial.println(x);
      for(i=0;i>=0;i--){
        buf1[i]= x % 10;
        x /= 10;
      }
      vw_send((uint8_t *)buf1,1);
    }

What is this for loop supposed to do?
3730  Using Arduino / Programming Questions / Re: SD card file creation on: August 03, 2013, 06:53:24 am
The String class is making your code needlessly complex, as well as introducing the possibility of memory corruption in versions prior to 1.0.4 and heap fragmentation in all versions.

Why don't you generate the file name directly in a plain old c-string (i.e. null-terminated char array)? Just declare a char array of the maximum length of your file name and use snprintf() to generate the file name from the number. This will also give you control over leading zeroes etc, which might be useful if you want your files to be sortable alphabetically.

Once it is working you might also want to think about how you will handle or avoid the device filling up.

3731  Using Arduino / Programming Questions / Re: Arduino to web host connection failed on: August 03, 2013, 06:42:32 am
Code:
  Serial.println("Better client test 9/22/12"); // so I can keep track of what is loaded

You might consider changing that to:

  Serial.println(__FILE__ " " __DATE__ " " __TIME__); // so I can keep track of what is loaded
3732  Using Arduino / Project Guidance / Re: TX RX pins work, usb doesn't on: August 03, 2013, 06:35:51 am
So if I understand you correctly, the data that goes into TX and RX pins is different than the data entering the USB, d+ d-, pins.

It is completely different. USB is based on a complex message-based protocol that is vastly different to the simple digital square wave of an async serial stream.

Fortunately your Arduino has a USB driver that can handle the USB protocol for you and presents the interface as a simple serial port. Whatever the 'host' end of the USB is connected to would need to provide a corresponding USB driver which deals with the USB message protocol and again presents the interface as a (virtual) serial port within the host. If the host platform is supported by the Arduino IDE then you should already have suitable drivers available. If it isn't supported then I suggest you look for solutions that do not involve USB.
3733  Using Arduino / Project Guidance / Re: Read/Write serial data, handling reset on write. on: August 03, 2013, 06:14:21 am
How does one address the pins without a sketch on the board

One doesn't - one downloads a sketch which addresses the pins.
3734  Using Arduino / Project Guidance / Re: Arducam: How to save a frame in a variable on: August 02, 2013, 02:47:02 pm
i need to save a frame in a variable

How big is the frame in bytes?
3735  Using Arduino / Project Guidance / Re: Problem in running an 'if' 'else' statement with a mini project on: August 02, 2013, 02:43:21 pm
You need to remove the semicolon at the end of line 49 to turn that into a valid function definition to resolve the error at line 37.

I suggest that you sort out that code which is not inside a function next since it will never compile like that.

For future reference, if you want help resolving a compilation error you need to post the code that causes the error and the complete error message.

Pages: 1 ... 247 248 [249] 250 251 ... 747