Show Posts
Pages: 1 ... 156 157 [158] 159 160 ... 360
2356  Using Arduino / Project Guidance / Re: Problem code hangs after a few hours - Xbee / Uno / WIZ820io on: March 19, 2013, 01:59:42 am
Quote
Thanks for that, however something I am forgetting is the fact that I have to have a query "string" there is no way round that, char arrays wont help.
The query string is what is used in the the HTTP post request to post the data to a web site, that query has to be a url encoded string, it cant be anything else.
That is a query "string", not a query "String". I use this all the time, and I do not use Strings. They crash. I use character arrays. The server does not know the string was assembled in a character array or a String, as long as it has no illegal characters in it.

edit: Do you see something wrong with this?
Code:
char query[64];
int stuffInt = 32;
char stuffString[32] = "This+is+some+stuff";

sprintf(query,"GET /mypage.php?oneParam=%i&twoParam=%s HTTP/1.0",stuffInt,stuffString);
client.println(query);
2357  Using Arduino / Storage / Re: storage from the internet on: March 18, 2013, 07:42:48 pm
Here is some code to speed up your download.
http://arduino.cc/forum/index.php/topic,134868.msg1123725.html#msg1123725

This call is in read()
Code:
      //client.write(myFile.read());    //  I do not know why this line not works
client is a variable local to loop(). If you want to use the client variable, you must either pass that as a parameter in the function call, or declare client as global.

Stay away from the String data type. It is unreliable and prone to crashing. Use character arrays instead.
2358  Using Arduino / Programming Questions / Re: Is the eye able to see flashes at 30kHz? on: March 18, 2013, 04:37:47 pm
It is your persistence of vision that allows you to see it. I've run the D13 led about as fast as this thing will run it, and I still see the led lit abut half bright. A television runs your eyeballs about as fast as they can work. Remember, an analog tv is just one little tiny spot moving across the screen in a hurry.
2359  Using Arduino / Project Guidance / Re: Problem code hangs after a few hours - Xbee / Uno / WIZ820io on: March 18, 2013, 04:09:27 pm
Here is floats:
Code:
char floatBuf[12];
float stuffFloat = 12.34;
dtostrf(stuffFloat,3,2,floatBuf);
Serial.println(floatBuf);
Then use sprintf to add floatBuf as a %s where you want it in the query string.
2360  Using Arduino / Project Guidance / Re: Problem code hangs after a few hours - Xbee / Uno / WIZ820io on: March 18, 2013, 03:48:27 pm
Quote
Any pointer on converting my query string to a character array?
Afterthought, I thought text strings in C were character arrays?
The String type is not the same as string type.

With character arrays, sprintf is your friend!  smiley
Code:
char query[64];
int stuffInt = 32;
char stuffString[32] = "This is just stuff";

sprintf(query,"Stuff I want to send: %d and %s",stuffInt,stuffString);
Serial.println(query);
It won't do floating point. You can do floats with a different function tho.
2361  Using Arduino / Networking, Protocols, and Devices / Re: Serial communication via Telnet on: March 18, 2013, 03:32:37 pm
...and not cheap. My normal install is a few hundred dollars in parts.

edit: Then add a few hundred dollars extra for a solar panel and charger...
2362  Using Arduino / Networking, Protocols, and Devices / Re: Serial communication via Telnet on: March 18, 2013, 02:54:04 pm
These questions seem to come in bunches, kinda like bananas!
http://arduino.cc/forum/index.php/topic,155003.0.html
Take a look at the posts there.
2363  Using Arduino / Programming Questions / Re: Sketch compiles to Mega1280 but not to Mega2560 on: March 18, 2013, 02:40:59 pm
I think HazardsMind may be right. Here are the two lines causing your problem.
Code:
// Line 64
  DallasTemperature(OneWire*);

// and line 222
  OneWire* _wire;

Both refer to OneWire, and it does not seem to know where that library is.
2364  Using Arduino / Project Guidance / Re: Accessing Arduino USB remotely on: March 18, 2013, 02:24:30 pm
Conditionally, yes. I can. I use a RB433UAH router with a Mega2560/ethernet shield. The ethernet shield connects to one of the ethernet ports, and the Mega usb connects to one of the two usb ports on the router.
http://routerboard.com/RB433UAH
The MikroTik O.S. allows you to log in to the router using ssh with a special user/password, and connect to the usb port like a telnet connection. It also provides good clean power over the usb port, so that eliminates another headache. You can power the router with a 12v solar/battery setup for really remote locations.

It isn't easy, and it isn't cheap.
2365  Using Arduino / Programming Questions / Re: Sketch compiles to Mega1280 but not to Mega2560 on: March 18, 2013, 02:12:13 pm
Try adding "#include <OneWire.h>" to your sketch. It appears you library may no longer find "OneWire.h". Do you know where that is?

http://playground.arduino.cc/Learning/OneWire
2366  Using Arduino / Project Guidance / Re: Arduino web server ideas. on: March 18, 2013, 01:38:42 pm
Besides, there are some files too big to fit into program memory. Here is zoomkat testing a 253k file download speed.
http://arduino.cc/forum/index.php/topic,134868.msg1124757.html#msg1124757
2367  Using Arduino / Programming Questions / Re: Sketch compiles to Mega1280 but not to Mega2560 on: March 18, 2013, 01:12:38 pm
Now you have a problem with something in this file:
/home/skurt/sketchbook/libraries/dallasTemperatureControl/DallasTemperature.h
Can you post that file? Maybe I can see what the problem is.
2368  Using Arduino / Programming Questions / Re: Sketch compiles to Mega1280 but not to Mega2560 on: March 18, 2013, 10:43:50 am
A linux box I bet, and using the repository version of the IDE.
Quote
/usr/lib/gcc/avr/4.7.0/../../../avr/lib/avr6/crtm2560.o: In function `__bad_interrupt':
Have you tried the Arduino website version? It has all that stuff (avr-gcc and avr-libc) included. You can have both on your computer together. Download the correct OS software from here:
http://arduino.cc/en/Main/Software
Unpack it in a local directory. Navigate to that directory and run the arduino shell script there. See if that does any better.

I use Ubuntu v11.10 and v12.04 with the Linux 32 bit version IDE. Works great on both, except for the contrast on the menu with v12.04.  smiley-confuse

The Ubuntu repository IDE had problems with both versions of Ubuntu.
2369  Using Arduino / Project Guidance / Re: Arduino web server ideas. on: March 18, 2013, 10:25:04 am
Normally, I would recommend my code in the playground, but zoomkat is the guy with the SD interface examples working. You might want to look at the code in this link:
http://arduino.cc/forum/index.php/topic,152642.msg1147210.html#msg1147210
2370  Using Arduino / Project Guidance / Re: Suggestion how to monitor the level of propane/butane gas cylinder on: March 18, 2013, 07:58:06 am
That looks like a good place to start. There was no datasheet on that page about voltages or resolution, but this is not rocket science (yet).

I use pressure on compressed gasses, like air (dive tank) or CNG (cooking fuel for a boat).
I use weight on liquified gasses, like propane and butane.
Pages: 1 ... 156 157 [158] 159 160 ... 360