Show Posts
Pages: 1 ... 2247 2248 [2249] 2250 2251 ... 3389
33721  Using Arduino / Programming Questions / Re: Problem using Time.h library on: December 21, 2011, 11:56:35 am
There is a Processing sketch that you can run, that the Arduino can communicate with to get the time on the PC, in seconds since 1/1/1970.

Quote
And it has to be synced with the same time() output of any other device.
Not even close to realistic, unless you get the time from that device.
33722  Using Arduino / Programming Questions / Re: Using the wave shield with the ethernet shield? on: December 21, 2011, 10:54:51 am
The ethernet shield uses pin 10 as the chip select pin. You'll need to move that wire to a different pin on the Wave shield.
33723  Using Arduino / Programming Questions / Re: void value not ignored as it ought to be on: December 21, 2011, 10:48:57 am
Code:
  timer.setTimeout(1,goLed1);
  timer.setTimeout(1,goLed2);
Once per millisecond, you want to call goLed1 and goLed2.

Code:
void goLed1(){
 int j;
 for(j=0;j<=255;j++){
   analogWrite(6,j);
   delay(5);
 }
 delay(200); 
  for(j=255;j>=0;j--){
    analogWrite(6,j);
    delay(5);
  }
}
This code will take more than 3000 milliseconds to execute. How can you expect to call it once per millisecond?
33724  Using Arduino / Programming Questions / Re: Problem using Time.h library on: December 21, 2011, 10:15:42 am
You need to set the time, somewhere. The Arduino doesn't have a clock. It only knows how long it has been running.
33725  Using Arduino / Project Guidance / Re: Arduino + 2 Servos + External Power on: December 21, 2011, 09:04:49 am
External power supplies are generally NOT rated in amp-hours. Batteries are. One generally expects a wall-wart to be able to supply the rated current forever, not for some number of hours.
33726  Using Arduino / Networking, Protocols, and Devices / Re: UDP send/receive problems... on: December 21, 2011, 08:33:11 am
Quote
I would like to send float() to a PC program
You want to send a function to a PC? You'll need a different name for the function, since float is a reserved keyword.

Quote
when I
try to convert data to string i get this errors

float tmp102temp = 22.34;
char ReplyBuffer[] = {tmp102temp};
I'm not surprised that you get errors. You are trying to stuff a 4-byte float into an 1 byte character.
33727  Using Arduino / Programming Questions / Re: How to use Print function on: December 21, 2011, 08:26:19 am
Quote
But I always can change that later on when I am some further with my library
Now, when there is a small amount of code, or later when there is more. I know when I'd start using better names.

Code:
int declength = sizeof(arrayc);
The arrayc variable (dumb name) is an int. All ints are 2 bytes. That's what sizeof() is telling you.

Code:
char value2[declength];
itoa(arrayc,value2,10);
So, you are reserving space for one character and the trailing NULL.

Quote
since I might be able to use sizeof(); to determine the length of the variable
No, you can't.

An int can hold a value between -32768 and +32767. If you can't figure out the size of an array necessary to hold the string representation of an int from that information, we can't really help you anymore.
33728  Using Arduino / Project Guidance / Re: led drum lights on: December 21, 2011, 07:37:15 am
Quote
How would i increment the array pointer +\- 1 one time per event ?
What array pointer?

How do you define an event?
33729  Using Arduino / Interfacing w/ Software on the Computer / Re: INTERFACING ARDUINO WITH FLASH on: December 21, 2011, 07:08:31 am
Quote
now i can not able to open  .fla file
Where? You won't be able to open them on the Arduino. If it's on the PC, the problem has nothing to do with the Arduino.
33730  Using Arduino / Programming Questions / Re: Time and TimeAlarms Libraries – Ask here for help or suggestions on: December 21, 2011, 06:46:19 am
Apparently you do know how to use the Serial.print() function to print values. Use it to print messages, too. How often does Battery() get called. What is the value of Counter in loop?

I don't see anything in your code that puts the Arduino to sleep between Alarm calls to Battery.
33731  Using Arduino / Programming Questions / Re: void value not ignored as it ought to be on: December 21, 2011, 06:20:36 am
Quote
And your complaint is? ...
Well, OP did say:
Quote
Is there any other way to get setTimeout functionality as it was before (simpleTimer.h) ?
33732  Using Arduino / Programming Questions / Re: Reading serial data and echoing it on: December 21, 2011, 06:18:20 am
Quote
Is that more on the right track?
The code placement is now good. Tools + Auto format would be a good thing to do.
33733  Using Arduino / Programming Questions / Re: Problem using Time.h library on: December 21, 2011, 06:07:05 am
Quote
Didn't know that!
It's not clear in the install instructions that it is necessary to restart the IDE. It is, though, because one of the things that the IDE does on startup is populate all the drop-down lists. The list of libraries to import is determined at startup, not when the list is requested. If you change the list of libraries after the IDE is started, it doesn't know that.
33734  Using Arduino / Networking, Protocols, and Devices / Re: SD Card on Arduino Nano on: December 21, 2011, 05:59:29 am
Quote
Xbee, hardware, connected to a software serial port. Done.
The "software" serial port is HARDWARE.

Quote
My question: has anyone successfully connected an SD card to any other pins, not just the standard 11-13.
The SD card is an SPI device. It can only be connected to the SPI pins.
33735  Using Arduino / Programming Questions / Re: Problem using Time.h library on: December 21, 2011, 05:56:02 am
OK. It looks like you (now) have the Time library installed correctly.

Did you stop and restart the IDE, after installing the library, before trying to import it?
Pages: 1 ... 2247 2248 [2249] 2250 2251 ... 3389