Show Posts
Pages: 1 2 3 [4] 5 6 ... 748
46  Using Arduino / Programming Questions / Re: Creating a Web Server: Multiplexer & Ethernet Shield on: April 17, 2014, 05:48:31 pm
What IP address has your UDP server actually bound to?

Have you confirmed that devices in the subnet your Arduino is in can reach the subnet that your server is in?

I'm trying to use UDP packet from my Arduino. That's the only way I'm aware of to send data from my Arduino and Ethernet Shield.

You can use any TCP/IP or UDP/IP protocol. UDP can work (assuming you have provided IP connectivity and implement the client and server correctly) but it's far from the only option.
47  Using Arduino / Project Guidance / Re: reading from 4 SoftwareSerials one after another on: April 17, 2014, 05:39:15 pm
Perhaps there's something wrong with your code. However, that snippet isn't enough to show what you've done wrong. Please post a complete sketch that demonstrates the problem. If your sketch includes a lot of code not relevant to the problem I suggest you create a minimal sketch that demonstrates the problem in the simplest way you can think of. Quite often, just creating that will enable you to solve the problem for yourself. Even if it doesn't, you've still reduced the amount of code we need to wade through to understand your problem.
48  Using Arduino / Project Guidance / Re: A network of Arduinos reporting to a central device or computer? on: April 17, 2014, 05:35:17 pm
This would all be wired. There are half a dozen sites spread across 5 counties, about 35 miles at most, with microwave LAN bridges that use 802.11g over 900mhz diplexed onto the FCC licensed 950mhz band. But for the purpose of answering the question: it's "wired". =-)

Also, at its max there would be a maximum of maybe like 18-20 remote Arduinos.

If you can provide access from each LAN to the public internet, and allow access from the public internet to a management station which can receive the incoming data, then the communication part becomes a simple TCP/IP design issue.

If you can't establish TCP/IP connectivity then the problem will be harder.
49  Using Arduino / Project Guidance / Re: interfacing Jpeg colour camera C329 with Arduino mega 2560 on: April 17, 2014, 05:28:27 pm
PeterH : kind of broken..! i have searched it but was not able to fetch some useful data regarding my task that's why i posted something here...

That's peculiar, because when I search for c329 arduino I get tons of hits. I don't suppose they're all directly relevant, but I feel sure that somewhere in all this information is an explanation of how to interface a c329 camera with an Arduino:

New Arduino Library for our C329 UART cameras!!!
C329 Camera and Arduino test fixture.
C328 and C329 Cameras
C++ library for the C329 SPI camera module

That's just the top few of about 15,000 results.
50  Using Arduino / Project Guidance / Re: Github question? on: April 17, 2014, 05:16:36 pm
everytime the arduino or clone starts up, it updates the code from the repo?

You mean you want the Arduino to install an updated sketch on itself? That would have to be done through something else. Assuming what you put on Github is the source, you'd need to have some application running on another device acted as a manager it would need to detect the source updates, recompile the sketch and then decide when to upload it to the Arduino. If you want that upload to be triggered by an Arduino reset it would require the Arduino to notify the manager device that it has started up (and presumably which version of the sketch is running), so that the manager can decide whether it needs to be updated. There are build tools specifically designed to keep a built application up to date relative to a repository and other tools designed to manage the deployment as the application is updated, so if you wanted something fancy that would all be feasible. But for a simpler solution you could just update the source hierarchy on a scheduled basis and use make to decide when to rebuild it, and then have a DIY application that worked together with the sketch to work out what version of a sketch is running and perform the upload if necessary.
51  Using Arduino / Project Guidance / Re: Log FuelFlow -Reading 4 frequency inputs (digital on/off) and logging to SD card on: April 17, 2014, 10:52:40 am
The pgenPreviousMicros variable in pgen() needs to be declared as a static variable, so that it keeps its value between calls. (Otherwise it will be allocated automatically on the stack and the value will be discarded when the function returns.) This change is important because pgen() won't work correctly without it.

static unsigned long pgenPreviousMicros = 0;

Given that your logging is only done once per second, using micros() to time it seems overkill. I would use millis() unless you need the extra resolution of micros(), although what you have ought to work.

The update to previousMicros is in the right code block now. Personally I'd prefer to put it at the top of the block (next to the 'if' statement that is doing your elapsed time check) so that it is more obvious that it is updated correctly, but it won't affect the behaviour.

To eliminate the redundant calls to micros() you would save the value of micros() in a variable somewhere near the start of the function.

unsigned long nowMicros = micros();

Then you would use the currentMicros variable throughout the rest of the function where you had calls to millis(). I wouldn't expect this change to make much difference to the functionality but it just eliminates the possibility of inaccurate timing if the value of millis() changes while this function is running.

I haven't spotted the dataString statement that you asked about.
52  Using Arduino / Project Guidance / Re: two water pump project for newbie on: April 17, 2014, 09:17:22 am
I would like to do:
+ Switch on & off two water pumps by a button without computer (no USB connected)

It seems to me that you could achieve this very simply by using the switches directly to turn the pumps on and off - what makes you think there is any need to involve a microcontroller?

it's has to run automatically as an installation

I don't know what you mean by 'run automatically' i.e. what it needs to do when it's running. Your original description was very simple:

I would like to do:
+ Switch on & off two water pumps by a button without computer (no USB connected)
If that's accurate and you just want to have the pumps turn on and off by a button, the Arduino is redundant.
53  Using Arduino / Programming Questions / Re: Boat autopilot - PID not centralizing rudder. on: April 17, 2014, 09:12:52 am
The wind direction at the mast head will be different from the wind level lower down, though. Whatever you do will be a compromise because the wind is not uniform and no single measurement can give you an accurate answer.
54  Using Arduino / Programming Questions / Re: Webcam on: April 17, 2014, 09:09:57 am
Do you understand the terms Local Area Network, WiFi, MiFi, GPRS? It's hard to explain more clearly without simply repeating myself, but in short the MiFi unit is specifically designed to do exactly what you're trying to do. The MiFi acts as a gateway between the local area network that the webcam is connected to, and the GPRS wide area network. It provides network connectivity between devices connected to the MiFi network, and devices connected to the internet. That's what you want. That's what it does. How much more simply can I put it?
55  Using Arduino / Programming Questions / Re: Error: com port X already in use on: April 17, 2014, 09:05:05 am
In that case I'd look for plug-ins and extensions installed in Chrome to see what on earth is causing it to access your serial ports. There's no obvious reason for a browser to need to do that.
56  Using Arduino / Programming Questions / Re: multiple buttons on analog input on: April 17, 2014, 09:00:42 am
Why does anyone need a library to send characters to the serial port.

I think that the sketch is intended to send simulated keyboard events to the host PC. And as far as I can figure out from this thread, that part is irrelevant to the problem, which is simply to detect key presses on a keypad connected to an analog input via a resistor circuit, and doesn't seem to need anything more complicated than a sequence of range checks on the value returned by analogRead() to detect the currently-pressed key, followed by a comparison with the previously-pressed key.
57  Using Arduino / Programming Questions / Re: How to grab responses from Serial Terminal? on: April 17, 2014, 06:05:06 am
The response will come as a sequence of characters. The available() method of the software serial port object will return the number of characters that have been received and are available for your sketch to read. Your sketch would need to call available() repeatedly and read characters as they become available. It is up to you whether you buffer them until you have received the complete response, or process them individually. Note that the serial port is very slow relative to the Arduino's processing speed so there will be a significant delay between consecutive characters arriving.
58  Using Arduino / Programming Questions / Re: Creating a Web Server: Multiplexer & Ethernet Shield on: April 17, 2014, 05:59:15 am
I am trying to send the data from a bunch of sensors to a web server that I've written using Node.js.

The term 'web server' usually means something that handles HTTP(S) protocol requests. Your client appears to be sending an arbitrary UDP packet which is definitely NOT an HTTP request.

What protocol do you actually intend to use between your client and server?
59  Using Arduino / Project Guidance / Re: two water pump project for newbie on: April 17, 2014, 05:39:03 am
I would like to do:
+ Switch on & off two water pumps by a button without computer (no USB connected)

It seems to me that you could achieve this very simply by using the switches directly to turn the pumps on and off - what makes you think there is any need to involve a microcontroller?
60  Using Arduino / Project Guidance / Re: Arduino Uno programming to activate a windows sound? on: April 17, 2014, 05:32:03 am
The Arduino can't do this directly - it requires cooperation from software on the PC. If the PC is running Windows, you could use GoBetwino for that - the alternative is to write your own equivalent. All the sketch would do is write the appropriate message to the serial port to command the PC application to play the sound.
Pages: 1 2 3 [4] 5 6 ... 748