Show Posts
Pages: 1 ... 1885 1886 [1887] 1888 1889 ... 3354
28291  Using Arduino / Programming Questions / Re: Return as char on: April 29, 2012, 07:38:12 am
An understanding of serial communications is very important. The Serial.read() function returns one byte/char at a time. The function would have byte as a return type if there was another mechanism to convey the error that arises when trying to read data that is not there. Because this problem can arise, and is so frequent, the Serial.read() function must return an int, since all possible values that can fit in a byte are possible legal return values.

If you are careful to always call Serial.available() before calling Serial.read(), you can store the returned value in a char, instead of an int. That convinces Serial.print() to handle the printing of the character correctly.

Storing the return value as a char also makes appending the character to a char array a lot easier.
28292  Using Arduino / Programming Questions / Re: opening multiple serial pathways using softserial on: April 29, 2012, 07:16:03 am
When  you have multiple SoftwareSerial instances, only one can listen at a time. If both are for outgoing data, this is not a problem. If either is to receive data, you MUST make sure that the receiver instance is active when the non-receiver is finished sending.

Do you really have a mySerial attached to pins 4 and 5? If not, why are you using that name? Why does the name not match what the instance is for?

Of course, port is not a great name, either. It seems unlike that you have a boat dock attached to pins 12 and 13.
28293  Using Arduino / Networking, Protocols, and Devices / Re: can somebody help me with gps on: April 28, 2012, 08:33:00 pm
After 47 posts, you really should have the hang of posting a URL. Select the 3rd icon from the left on the second row, and then paste the URL.

The GPS won't send data to your webpage. That device seems to contain all the hardware needed to collect GPS data and send it somewhere. I don't see what you expect the Arduino to do.
28294  Using Arduino / Networking, Protocols, and Devices / Re: XBee/Sparkfun/Arduino help on: April 28, 2012, 08:28:34 pm
Quote
DL:  1234
MY: 1
This is good.

Code:
DL: 0
MY: 1234
This is bad.

For the two XBees to talk to each other, the values for DL on one needs to match MY on the other (and neither should be 0). That is not the case for your configuration. DL on the first one matches MY on the second one, but DL on the second one does not match MY on the first one.
28295  Using Arduino / Networking, Protocols, and Devices / Re: i need help with arduino --------> Wifly --------> Mysql please !! on: April 28, 2012, 08:23:50 pm
Quote
then send poems to a Wi-Fi Mysql database.
I recognize all the words. The order that they are arranged in makes no sense. What kind of column definition are you using for the poem column? The database doesn't live on a router, so the WiFi term is confusing.

The WiFi shield lets you connect to an existing local area network that the router is connected to. Beyond that, you need to write code on the Arduino to talk to some server on which the MySQL database is running. It's unlikely that you are storing poems in a database.

I suggest that you try again.
28296  Using Arduino / Programming Questions / Re: Mega (Master Writer)/ UNO (Slave Receiver) I2C Problem on: April 28, 2012, 08:07:21 pm
Code:
  Wire.beginTransmission(20); // transmit to device #4
Try as I might, I can't make 20 equal 4.
28297  Using Arduino / Programming Questions / Re: HELP! diploma project - problem with my program regarding analogWrite(); on: April 28, 2012, 10:35:22 am
Perhaps you could humor us, and make your ISR behave properly (FAST! FAST! FAST!) and see if your problem persists. My guess is that you are taking so long on your ISR that it is interfering with other ISRs.
28298  Using Arduino / Programming Questions / Re: Mega (Master Writer)/ UNO (Slave Receiver) I2C Problem on: April 28, 2012, 10:31:58 am
Quote
Is this wrong?
I looked at:
http://arduino.cc/en/Main/ArduinoBoardUno
Quote
    TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire library.
So, it appears that one of the links is wrong.

It's an incredibly easy thing to test...
28299  Using Arduino / Networking, Protocols, and Devices / Re: Serial - Is possible to put a received data in an array of char ? on: April 28, 2012, 10:28:39 am
Code:
         incomingArray[x] = Serial.read();
            if (incomingArray[x] == '\0')
If the sender is sending ASCII data, incomingArray[ x ] will NEVER be NULL. The NULL is a trigger to the sender to stop sending. The NULL is not sent.
28300  Using Arduino / Networking, Protocols, and Devices / Re: Linking Xbee Pro to Arduino without shield on: April 28, 2012, 10:25:43 am
The non-Pro versions say that they are 5V tolerant on the TX/RX pins (but only those pins). I can't imagine that the Pro versions are not.
28301  Using Arduino / Networking, Protocols, and Devices / Re: Connecting a device to wireless router on: April 28, 2012, 10:23:39 am
Quote
What components I need for the device can connect to the wireless router?
Duct tape!

If that doesn't provide the kind of "connection" that you want, perhaps you could tell us what device you want to connect to the wireless router, what other devices are connected to the router, and whether you want that connection to be wired or wireless.
28302  Using Arduino / Interfacing w/ Software on the Computer / Re: how to upload contiki to arduino on: April 28, 2012, 10:20:47 am
What we need to know is what contiki is, where you got contiki.h, what the contiki.cpp file contains, and when the errors you are seeing are, along with your code.
28303  Using Arduino / Interfacing w/ Software on the Computer / Re: Computer GUI to Control Arduino/Adafruit on: April 28, 2012, 10:18:24 am
The ability to select baud rate appears to be missing from your GUI, as is a connect button.

Also missing is what each button should send to the Arduino when it is pressed.

Building a C# app that looks like that, with all the buttons functioning (when I know what they should send) wouldn't take more than a couple of hours. I could do something like that on Monday afternoon, if you need.
28304  Using Arduino / Interfacing w/ Software on the Computer / Re: User updates & configuration software for my Arduino Nano project on: April 28, 2012, 10:13:37 am
Quote
but in my case I'd be glad to have a simple little config program that sends stuff out via USB.
That is relatively easy. The config data can then  be stored in EEPROM, and read when the Arduino starts up.

Opening the serial port resets the Arduino, so any code to get config data could go in setup. When the user starts the Arduino, without the USB connected, there would be a short pause where the sketch looks for serial data. When none is found, it reads the data from EEPROM and starts loop()ing.

When the USB cable IS connected, it reads serial data from the app sending it the data, and overwrites the data in EEPROM. When the end of the data arrives, it starts loop()ing.
28305  Using Arduino / Programming Questions / Re: Mega (Master Writer)/ UNO (Slave Receiver) I2C Problem on: April 28, 2012, 10:04:37 am
Quote
Is this not correct? Maybe my picture is not clear?
It's not your picture. It's my eyes.

A5 is SCL. A4 is SDA on the UNO.

Now, it appears that you are swapping the pins from one board to the other. Double check my reading/assumptions for yourself, though.
Pages: 1 ... 1885 1886 [1887] 1888 1889 ... 3354