Show Posts
Pages: 1 ... 2247 2248 [2249] 2250 2251 ... 3234
33721  Using Arduino / Networking, Protocols, and Devices / Re: ENC28J60 problems on: October 12, 2011, 03:14:29 pm
Quote
Post a link to the device you really have.
is not what you did. A picture snipped from an ebay ad is not the same as a link.

What numbers/names are on the chips on your board?
33722  Using Arduino / Programming Questions / Re: WiFi server programming on: October 12, 2011, 03:04:06 pm
Quote
Its not working propubly it just run the motor for one sec and stop !
When? When you first request the page, with no parameters, or when you submit the page?

If it happens when you submit the page, what are you setting/selecting on the page before submitting it?

It shouldn't be this difficult to get you to clearly define the problem you are having.
33723  Using Arduino / Programming Questions / Re: SerialRead More than One Number on: October 12, 2011, 02:04:08 pm
Quote
This should work.
Did you try it? Did you even compile it?

Code:
while(price[i]){
  price[i] = 0;
  i++;
}
It isn't necessary to put a NULL in every position. Put a NULL in the first position, and then add a NULL after every character is added.

In any case, this is a bad way to to put the NULLs in the array. This code will quite happily run past the end of the price array, and stomp all over other data.

Code:
While(Serail.available()){ //If there is stuff to be read,
  price[i]=Serial.read();
  i++;
}
while, not While.

Serial data arrives slowly. This loop will read any data that has arrived. If half the number string has arrived, this code will read half a number, and assume it has the whole number.

Code:
boolean dataPiece;
while(price[i]){
  num+=(price[i]*pow(10,datapiece));
  i--;
  dataPiece++;
}
dataPiece is defined as a boolean, not initialized, and used as a number. byte is the same size, and implies that the variable being defined IS a number, while boolean does not.

pow is a very expensive function to use. It is also inappropriate, as it uses all float arguments, and returns a float. pow(10,2) will return 3.999999999999999999, which is 3 when stored in an int.

If price were properly NULL terminated (and complete), atoi() could be used to convert the array to a value, without the issues involved using pow (it's smarter than that).
33724  Using Arduino / Networking, Protocols, and Devices / Re: Arduino + Xbee question on: October 12, 2011, 01:08:21 pm
More than 2 series one XBees can talk to each other, if one (the central one) uses broadcast mode. The drawback to broadcast mode is that messages can be delayed. If when the messages are delivered doesn't matter, or the central XBee is a listener only, then use 3 series 1 XBees.

Otherwise, get the series 2 models.
33725  Using Arduino / Networking, Protocols, and Devices / Re: ENC28J60 problems on: October 12, 2011, 12:00:00 pm
Quote
It maybe has to do with the fact that my card is not a EtherCard, but an Arduino Shield v1.1
Post a link to the device you really have.
33726  Using Arduino / Networking, Protocols, and Devices / Re: Xbee Explorer Regulated Shield on: October 12, 2011, 11:47:06 am
draythomp to the white courtesy phone, please.

draythomp seems to be the resident expert on series 2 XBees.
33727  Using Arduino / Networking, Protocols, and Devices / Re: wireless communication problem on: October 12, 2011, 11:43:36 am
Quote
I was not using X-CTU, I guess this causes another problem.
Well, that explains why the two XBees don't communicate.
33728  Using Arduino / Programming Questions / Re: SerialRead More than One Number on: October 12, 2011, 11:29:52 am
Quote
How can I give directly form serial.read the whole number to my variable?
You can't. But, this might help.

http://jhaskellsblog.blogspot.com/2011/05/serial-comm-fundamentals-on-arduino.html

This issue only gets asked once a week or so, so we can see that you did a great job of searching first.
33729  Using Arduino / Programming Questions / Re: WiFi server programming on: October 12, 2011, 11:15:49 am
Quote
this is the code that i got
Quote
and this is the code that i modified
And the problem is?
33730  Using Arduino / Project Guidance / Re: New-not sure where to start with Harley.....very long! on: October 12, 2011, 09:43:04 am
@Hooch
Where are you located? If you are in the US, how do you intend to satisfy the requirement that an odometer that can not be tampered with be provided?
33731  Development / Suggestions for the Arduino Project / Re: File- Examples- Can't see all examples on: October 12, 2011, 07:37:18 am
Quote
This may seem like a minor quibble but it is an unnecessary barrier to beginners.
Quote
If your list of examples runs off the screen as mine does(additional examples from teensyduino), it seems there is no way to view the ones below the screen edge.
Adding the teensy to the mix is what caused your problem (along with a tiny monitor, likely). Adding the teensy to the mix is not a beginner activity. If you do, then you can't complain that there are too many examples.

There are other ways to locate the examples, and to open them.
33732  Using Arduino / Networking, Protocols, and Devices / Re: wireless communication problem on: October 12, 2011, 07:03:23 am
Your sender never reads from the serial port, so, in the receiver, what is this for?
Code:
    Serial.print(int(incomingByte));

Quote
The receiver is getting something, but totally different values at first
How do you know what the receiver is getting?

You should isolate the problem. Put the LED (with resistor) on the sender, WITHOUT the XBee shield. Get it reacting to the IR sensor output properly. Then, put the XBee shield back on, with the switch in the DLINE position (on both shields).

Use NewSoftSerial to create a software serial port involving pins 2 and 3. Use the software serial port to talk to the XBee and the hardware serial port to talk to the PC.

This way, you can send data to the XBee and the serial monitor, or receive data from the XBee and send it to the serial monitor.

Echo what you send, and what you receive (on a different computer or different instance of the IDE/Serial Monitor on the same computer), to make sure what is sent IS what is received.

Quote
Do I have to assign destination address for both xbees in the code?
No. You assign MY and DL for each series 1 XBee using X-CTU (from digi.com).
33733  Using Arduino / Networking, Protocols, and Devices / Re: Xbee Explorer Regulated Shield on: October 12, 2011, 05:21:35 am
Quote
I've configured both Xbee modules in the same way with X-CUT (saving a profile an loading this profil to both Xbee modules) .
"I've changed this and that, but I won't tell you what I changed, or what I changed to. But, trust me, I changed everything I needed, and only what I needed to, and I changed them to the right values."

No, I don't think so.

The XBee Explorer and the USB Explorer both have associate LEDs that should be blinking to indicate that the XBees are ready, willing, and able to communicate. Are they?
33734  Using Arduino / Programming Questions / Re: Wireless communication on: October 12, 2011, 05:13:41 am
Quote
The Virtualwire sends only Char??  i have to convert the Integer ( temp) in char in order to send it? or what??
The VirtualWire class sends bytes, not chars. If temp is an integer, it is two bytes long.

Code:
    vw_send(uint8_t *)msg;
This won't even compile.

Code:
    vw_send((uint8_t *)temp, 2);
will send the two byte integer, temp, across.
33735  Using Arduino / Programming Questions / Re: Please help me about Servo motor code on: October 12, 2011, 05:03:58 am
Code:
# include < servo.h >
 # define servo.h
 # define myservo
The file is Servo.h, not servo.h. Case makes a difference, in spite of the crap that Microsoft pulls.

The #define statements indicate cluelessness. Get rid of them.

Code:
serial.begin(9600) ;
All executable code must be in a function. There is no serial object. It is Serial.

Get your shift key fixed, or find it, or use it. Whatever it takes.

Code:
   void Setup () 
That's setup(), not Setup(). Use the shift key only when it is supposed to be used.

Code:
int pos = 0 ; // speichern position Servo
What's this for? It's never used.

Code:
   myservo.attach(9) ; // Servo an Port 9     .that line is not recognized when compiling.
Of course it isn't. You haven't created an instance of the Servo class called myservo.
Pages: 1 ... 2247 2248 [2249] 2250 2251 ... 3234