Show Posts
Pages: 1 ... 130 131 [132] 133 134 ... 249
1966  Using Arduino / Project Guidance / Re: Digital air conditioner control for daily car, possible with arduino ? on: December 01, 2012, 04:50:32 am
Sounds good. How about a second pot to specify the set temp?
1967  Topics / Robotics / Re: Obstacle avoidance with an UGV -HELP PLEASE- on: December 01, 2012, 04:40:36 am
]Might be a bit much for one sitting.
OP is 16-YO.

Perhaps, but that CS373 course is excellent. Even if the OP doesn't take it all in on the first sitting, it's worth doing because it'll be an eye opener on just how hard the problem domain is.
1968  Using Arduino / Programming Questions / Re: single VNH5019 Motor Driver Carrier on: November 30, 2012, 06:31:04 pm
That's it. Max is 255, which is why I suggested storing it in a byte.
1969  Using Arduino / Programming Questions / Re: single VNH5019 Motor Driver Carrier on: November 30, 2012, 04:23:02 pm
Use analogWrite on your PWM_pin. Keep the speed in a byte variable, increase and decrease it when your serial commands ask for it, then use it in a call to analogWrite.
1970  Using Arduino / Programming Questions / Re: error: 'setChar' was not declared in this scope on: November 30, 2012, 03:34:08 pm
Your problem may be caused by the IDE declaring function prototypes for you. Try moving the setChar function definition up before it is called.

Edit: Nick, yet again, you typed more quickly!
1971  Using Arduino / Programming Questions / Re: for(;;) ; ??? on: November 30, 2012, 09:59:20 am
I think I recognise that comment from one of the ethernet or wifi example sketches. It's what happens in setup if it can't initialize the networking hardware - everything else in the sketch relies on there being network comms available, so it just stops. Error msg would be nice though.
1972  Using Arduino / Programming Questions / Re: confusion with analogRead on: November 30, 2012, 08:01:53 am
Not sure if this would help in your case, but you might take a look at GNU indent - it takes a gazzillion command line options, so you might be able to persuade it to format your code the way you like it indented if the IDE has mangled it for you.
1973  Using Arduino / Programming Questions / Re: confusion with analogRead on: November 30, 2012, 07:35:36 am
I'd suggest if you have messy code, make it a priority to tidy, even if you're not going to show it to anyone else. Just cleaning up the indentation will sometimes show you where a bug (or potential one) lies. Moreover, why make life more difficult for yourself - coding has pitfalls enough - no need to add to your problems by making it hard to read.

Lastly, I'm sure this varies by person, but the last thing I'm going to do once my code is working is to spend time prettifying it so it had better be neat already so that when I come back to it months later, I have some chance to understand it.
1974  Using Arduino / Project Guidance / Re: arduino with ethernet shield communicating with PHP on: November 30, 2012, 07:15:44 am
Looking at a similar example in my own code (copied no doubt), I note that I'm sending a blank line after the get request. Try changing this:
    client.print("GET /backend/fetchAantalOpen.php HTTP/1.0");
to this:
    client.println("GET /backend/fetchAantalOpen.php HTTP/1.0");
1975  Using Arduino / Project Guidance / Re: Interfacing an Altimeter that has Serial Output on: November 30, 2012, 07:02:58 am
Combining the code already supplied gives you this:
int foo; // Useless declaration to molify the IDE
#define isdigit(X) (((X) >= '0') && ((X) <= '9'))

void setup()

void loop()
int AGL=read_int();
// Do math

int read_int()
static byte c;
static int i;

i = 0;
while (1)
  while (!Serial.available())
  c =;
  if (c == '\r')
    return i;
  if (isdigit(c))
    i = i * 10 + c - '0';
    Serial.print("\r\nERROR: \"");
    Serial.println("\" is not a digit\r\n");
    return -1;
Compiled, not tested
1976  Using Arduino / Project Guidance / Re: Quadcopter stabilization algorithm on: November 29, 2012, 07:46:59 pm
No need for pseudocode - the PID library has the real thing and you can read about it here:
1977  Using Arduino / Programming Questions / Re: Get the current date on: November 29, 2012, 12:39:33 pm
Take a look at the time library: - it'll do it for you.
1978  Using Arduino / Programming Questions / Re: Serial problem on: November 29, 2012, 06:43:06 am
1. You can download the latest version from the main site if you don't already have it, but the issue isn't the IDE, your code needs to change.
2. 64. Tweak your input data to be less than 64 and reduce the number of commas that trigger printing and you should see something coming from the Arduino.
3. Null terminated arrays of char and the standard c functions that handle them with names that start with str, such as strcpy, strcat.
4. You can still use String, though it is ill advised because of the memory allocation bug that comes with it. But you need to get rid of delay as AWOL advised.
1979  Using Arduino / Project Guidance / Re: data logging to MySQL using serial port -- Firmata limitations on: November 28, 2012, 10:36:22 am
I've done a little project that was a subset of what you're trying to do. The arduino measures temperatures and sends them to a web server (over wifi) using a get request as PaulS suggested, the web server pushes the data into a MySQL database. Charting is done via a couple of additional pages driven by perl (only because I've never used PHP) which use Google charts to produce pretty pictures. I can post any or all of the code that does this if it would help.
1980  Using Arduino / Project Guidance / Re: Rebuild a CNC router with Arduino on: November 28, 2012, 07:18:15 am
Hard to say without more details. Assuming the controller consumes some kind of CAD/CAM part file and commands stepper motors acordingly, definitely non trivial though.
Pages: 1 ... 130 131 [132] 133 134 ... 249