Show Posts
Pages: 1 ... 1888 1889 [1890] 1891 1892 ... 3066
28336  Using Arduino / Interfacing w/ Software on the Computer / Re: Problems with Serial communication on: January 07, 2012, 02:53:42 pm
i can connect to the serial port via two ways:
Which is, of course, irrelevant. What is relevant is the code you are using.
28337  Using Arduino / Programming Questions / Re: Basic #include "..." doesn't work? Rant time! on: January 07, 2012, 02:45:26 pm
Why is this broken with Arduino?
It is not broken on the Arduino. The Arduino compiler found and included the header file. If it hadn't, it would not be complaining that it can't compile what is in the header file.

This isn't an Arduino supported library.
Then why are you trying to use it on an Arduino?

Arduino-supported and Arduino-compatible aren't the same thing, but you really need to quit ranting and show us what is in these mysterious header files.
28338  Using Arduino / Programming Questions / Re: report variables in html code on: January 07, 2012, 02:42:09 pm
client.println("font size='8'> %f",T);
Did you look at the documentation for the println function? It takes one or two arguments. When it takes to, the second must be an int and the first a float.

You need to format the string separately from the sending of the string.

By the way, the %f format specifier is not supported on the Arduino.
28339  Using Arduino / Interfacing w/ Software on the Computer / Re: Problems with Serial communication on: January 07, 2012, 02:39:05 pm
but nothing happens on the displays. as soon as i open up the serial monitor in arduino, everything works fine again
Your C++ application is not setting all the attributes of the serial port correctly. The Serial Monitor does. Opening it corrects the mismatch, and allows data to be sent properly.

All you need to do is set the serial port attributes correctly.
28340  Using Arduino / Programming Questions / Re: LCD serial display on: January 07, 2012, 02:34:33 pm
How do I do that ?!
1, 2, 3, 4, 5,...

Add some integer variable. Set it to 0 at the appropriate place. Increment it whenever a character is read.
28341  Using Arduino / Programming Questions / Re: how to return to the start of a loop whilst midway through on: January 07, 2012, 02:32:41 pm
In answer to the question, does the operator 'continue;' not do what you asked...returns to the start of the loop?
continue will jump back to the top of a loop. But, that has nothing to do with jumping to the start of loop().

The loop() function is a function. It can be ended at any point with a return statement. Then, main() will call loop() again.
28342  Development / Suggestions for the Arduino Project / Re: How much static RAM is used on: January 07, 2012, 02:25:46 pm
but it would be nice if the ARDUINO application would show the amount of used/free static memory
It would be nice if pigs could fly, too. And about as likely.

There are compile time things that use SRAM and run time things that use SRAM. Reporting how much SRAM is going to be available at run time might be useful. But, for the compiler to tell you how much SRAM you are going to use at run time is an unrealistic expectation.
28343  Using Arduino / Networking, Protocols, and Devices / Re: Communication between two Arduino BT on: January 07, 2012, 02:21:30 pm
I have no idea which program is using COM14.
You don't?

I have done the following knowing that virtual ports 13 (outgoing) and 14 (incoming) are assigned by window.
I haven't a clue what window you are talking about.
28344  Using Arduino / Networking, Protocols, and Devices / Re: My first Arduino attempt on: January 07, 2012, 02:18:19 pm
natures warning signs that things are possibly being hap hazardly being slapped together without a lot of thought.
Funny, but true.
28345  Topics / Robotics / Re: Using keyboard to control robot, breaking from a while loop on: January 07, 2012, 02:14:32 pm
I can press a key and the robot moves in a certain direction, however i want to be able to hold down a specific key it sets the robot in motion so that when i release the key it stops.
What is sending the data? The Serial Monitor does not have the ability to keep sending the same key over and over.

You are better off having whatever application send a character once when the key is pressed, and some other character when the key is released, You have 26 pairs of characters that could be sent that way (a/A, b/B, etc.).

      while (ch == 'w')
        forward(); // function to set servo wheels forward
        if ( ch != 'w')
          stopServo(); //function to stop servo

The while loop does not cause a change in the value of ch, so the inner if test will never be true, and the while loop will never end. (Unless there is something in forward() that changes ch, which you didn't show us.)
28346  Development / Other Software Development / Re: New IDE for Mac OS X written in Cocoa (WIP!) on: January 07, 2012, 02:08:43 pm
But the IDE sucks, because it's written in Java and not a native Cocoa app.
Pretty much useless for those of us using Windows.

There is a reason that Java is the basis for the IDE. It does work on all platforms, out of the box. Perhaps not the most useful app ever written, but it does work. And, it is open source. You are free to modify it, adding useful features. Submit them to the Arduino team, and maybe they will be added to the official distribution.
28347  Using Arduino / Networking, Protocols, and Devices / Re: My first Arduino attempt on: January 07, 2012, 02:04:06 pm
Well, possibly more correct to say that ethernet shields with built in PoE need to be removed for arduino programming.
Possibly. But then "Power over Ethernet" and "My first Arduino attempt" really don't belong on the same post.
28348  Using Arduino / Programming Questions / Re: need help in checking arduino codes on: January 07, 2012, 02:00:37 pm
  //(value between 0 and 1023)- to read the value of the potentiometer
  //(value between 0 and 180)-scale it to use with servo
What relationship between the gyro output and the servo angle are you expecting to maintain?

  sum1 = (0.15 *val4)+ (0.7 * val1) + (0.15 * val2);
val1 and val2 are in the range 0 to 179. val4 is in the range 1321 to 1500. This weighted average doesn't make sense.
28349  Using Arduino / Programming Questions / Re: I Also Need help with parsing code! extracting variables from HEX string on: January 07, 2012, 01:56:01 pm
I think the issue being overlooked is that; is a single character and not a string of characters. The only way to check for the 0xFB may be to have a series of if test for the characters in the 0xFB string as the characters are received in sequence.
0xFB is a value that can be transmitted in a single byte. But, you are right that Serial.print() of the incoming data is needed to know whether the device is sending binary data or ASCII data. As I suggested in the previous post.
28350  Using Arduino / Programming Questions / Re: how to return to the start of a loop whilst midway through on: January 07, 2012, 01:46:21 pm
i cant get rid of the last bit of the code as i dont think i will be able to get round not needing to go back to the start mid way through
I can't see why you would need to. Suppose you are at an art museum. There is one entrance and one exit. The only way to get to the exit is to look at every picture on the way, if you are not wearing sunglasses. At any point, if you get tired of looking, you simply need to put your sunglasses on and head straight for the end. At each side door along the way, note the sign that says if(!wearingSunglasses) turnLeft(). Since you are, you needn't turn left.

In the same way, you make every block of code conditional, and you can bypass large chunks of code when the condition is not true.
Pages: 1 ... 1888 1889 [1890] 1891 1892 ... 3066