Show Posts
Pages: 1 ... 2251 2252 [2253] 2254 2255 ... 3352
33781  Using Arduino / Programming Questions / Re: Sparkfun Max7456 breakout board on: December 01, 2011, 07:43:04 pm
Quote
Does anyone have a working sample for that?
A  link is worth 1000 words...
33782  Using Arduino / Interfacing w/ Software on the Computer / Re: Split Arduino serial data and send it to multiple softwares. on: December 01, 2011, 07:23:06 pm
Quote
Serial.print(0x00 0x31 0x00 0x32 0x00 0x33 0x00 0x0A, BIN);
The compiler is right. This code is rubbish. The documentation provided is not provided because people like to sit around writing documentation. It is there because people need to read it. That includes you.

Quote
How can i Serial.print in a new line?
See above comment.
33783  Using Arduino / Interfacing w/ Software on the Computer / Re: Processing-Arduino Xbee Communication problem on: December 01, 2011, 07:20:00 pm
What kind of XBees are they, and how are they configured?

Quote
So, obviously, there's nothing wrong with the code itself, because it runs okay via USB.
Right. If it works via wire, the code is OK. It is your XBee setup that has a problem. Exactly what the problem is depends on details you haven't shared.

33784  Using Arduino / Programming Questions / Re: Is there a way to display to the tenth on the serial monitor? on: December 01, 2011, 07:15:58 pm
Display what to the 10th decimal, and why. The Arduino only has a float type, which only has about 7 significant digits of accuracy. You can print 10 or 16 or more, but they won't mean anything.
33785  Using Arduino / Programming Questions / Re: Should I use the watchdog timer in every arduino project? on: December 01, 2011, 07:05:53 pm
Quote
I know the first prize is to try and figure out why is crashing.
Yes, it is. If a fresh set of eyes might help, we're often willing to look at your code, if you don't mind that we laugh at/criticize (I mean critique) it.
33786  Using Arduino / Programming Questions / Re: Read and compare on: December 01, 2011, 06:59:01 pm
Quote
How should I make that before arduino prints (randNumber) it looks - was the data before?
You want to compare this random number to one previous random number, or to a whole series of random numbers? If one:

Code:
unsigned long currNumber;
unsigned long prevNumber = 0;

void loop()
{
  currNumber = random(10000000, 19000000);
  if(currNumber != preNumber)
     Serial.println(randNumber);
  prevNumber = currNumber;
  delay(500);
}

If more than one, you need to keep an array of previous numbers, and compare the current number to each element in the array, in a loop. Set a flag if a match is found. If the flag is not set when the loop ends, the number is unique.

If you need to compare the value to all other values already written to the card, you need to read all the values on the card, one at a time.
33787  Using Arduino / Programming Questions / Re: robot hand shadowing on: December 01, 2011, 06:41:36 pm
Quote
Conceptually it would be very similar to the 'knob servo' example, but there's rather more to it than just changing a couple of values over in the example sketch.
But, not much more. Get it working for one finger. The rest will then be pretty east.
33788  Using Arduino / Programming Questions / Re: I2C lcd on: December 01, 2011, 06:40:04 pm
Aside from the fact that user installed libraries should be in the libraries folder in the user's sketch directory instead of that directory, the library should now be accessible. This presumes that the contents of that folder are correct. One more picture, please, of the contents of the LiquidCrystal_I2C folder.
33789  Using Arduino / Programming Questions / Re: getSting(?????) help with RSS reader project on: December 01, 2011, 06:29:28 pm
Quote
I have a problem with the highlighted line...

How much more information do you need?
We need to know WHAT the problem you have is. Is it just that you personally dislike that line? Is it the penguin that doesn't like it?
33790  Using Arduino / Programming Questions / Re: HELP: Web Client connection failed! on: December 01, 2011, 11:54:28 am
http://www.selfseo.com/find_ip_address_of_a_website.php
Use this link to find the IP address that a URL points to. Try a couple of different IP addresses for URL that you can access from the same network that the Arduino is connected to.

If your PC can access the site by IP address, the Arduino should be able to.
33791  Using Arduino / Programming Questions / Re: Write a float variable to EEPROM on: December 01, 2011, 11:48:09 am
Code:
   u.b[0] = EEPROM.read(address);
   u.b[1] = EEPROM.read(address+1);
   u.b[2] = EEPROM.read(address+2);
   u.b[3] = EEPROM.read(address+3);
You should meet my friend for.
33792  Using Arduino / Programming Questions / Re: Regarding Switch Case on: December 01, 2011, 11:35:21 am
Quote
In this code instead of reading the digital value of pins individually, i want to read all the 7 pins at a time.
You can read an entire port at one time, using the techniques here:
http://www.arduino.cc/en/Reference/PortManipulation

However, the only port with more than 6 pins is port D, and two of the pins in that port are the serial pins.

You could read two ports, masking all but 4 pins, combining the result, though, and achieve nearly the same result.
33793  Using Arduino / Interfacing w/ Software on the Computer / Re: bioera software talking to arduino on: December 01, 2011, 11:20:09 am
Quote
bioera gives out a and b
I don't know what this means.

Quote
i suppose there is something wrong with the variable.
Or your understanding of what the software actually outputs.
33794  Using Arduino / Networking, Protocols, and Devices / Re: SerialIP and the passing of Variables on: December 01, 2011, 11:00:07 am
Quote
What a mystery...
There's no mystery. This code:
Code:
  dtostrf(temp, 2, 0, tempchar);
calls a function that has this signature:
Code:
char * dtostrf (double __val, signed char __width, unsigned char __prec, char *__s)
It converts a double, temp, to a string with a width of 2 and a precision of 0 to a string, and stores that string in the memory pointed to be tempchar.

The only question is what memory does tempchar point to? Lets look.
Code:
char* tempchar;
By default, the compiler initializes all global variables, like tempchar, to appropriate values. In the case of a pointer, the appropriate value is NULL.

So, what memory does it point to? None. It's a NULL pointer, and dtostrf is smart enough to know to do nothing with a NULL pointer.

On the other hand,
Code:
  PSOCK_SEND_STR(&s->p, tempchar);
expects, apparently, for you to be smart enough to NOT pass it a NULL pointer.

Change tempchar's declaration to
Code:
char tempchar[24];
and try again.

The difference here is that tempchar is still usable wherever a pointer is needed, but, it is not NULL and does point to writable memory.
33795  Using Arduino / Storage / Re: SD card shield (Adafruit) battery power problems on: December 01, 2011, 10:36:04 am
Quote
any advice would be appreciated.
Any? OK. Here goes.

Put the 9V battery back in the smoke detector where you stole it from (or better yet, put a new one there), and get a real battery. 4 AAs will last far longer than the wimpy 9V battery, will provide more current, and will be cheaper.
Pages: 1 ... 2251 2252 [2253] 2254 2255 ... 3352