Show Posts
Pages: 1 ... 72 73 [74] 75 76 ... 269
1096  Using Arduino / Project Guidance / Re: hey guys. how do i combine 2 different codes??? on: January 19, 2014, 11:08:39 am
Yeah the delays will probably be an issue when you join the sketches.

With the delays in the one sketch, they're not a problem as such since they don't stop anything else becasue there is nothing else. But I'm sure they will cause a problem in the combined sketch since they will stop the other stuff.

Difficult to tell though, since you only posted snippets......
1097  Using Arduino / Programming Questions / Re: Download file via HTTP-request/response on: January 19, 2014, 08:03:14 am
Quote
Here's an example (that dosen't  work):

The Zen-inclined among us may wonder if an example that doesn't work is actually an example?
1098  Using Arduino / Programming Questions / Re: Is there such a thing as fast Serial.println? on: January 19, 2014, 07:51:46 am
I'm hoping that my answer, which has to be the best one  smiley-cool, and is about taking the serial prints out of the thing to be timed, has not been lost to the OP in the clutter arcane discussion.
1099  Using Arduino / Programming Questions / Re: Delete EEPROM every time Arduino is turned ON on: January 19, 2014, 07:37:56 am
Each address has a limited life. The key is knowing when one has worn out. Moving data around extends the life of the cell, but you also need to keep track of where the data is now, without wearing that address out.

Thanks Paul.

Quote
The key is knowing when one has worn out.

The real key, would be knowing when one has almost worn out, save its contents elsewhere, and remember never to use that cell again!

1100  Using Arduino / Networking, Protocols, and Devices / If you want to learn HTTP... on: January 19, 2014, 07:33:53 am
Hey good people wherever you are....

I came across this HTTP tutorial which looks useful. It has a link for a pdf download, and also to a QRG.

I found I was picking up odds and ends in various sketches, but not really understanding HTTP. I hope this will help me implement my HTCPCP RFC2324 compliant server.

Jim
1101  Using Arduino / Motors, Mechanics, and Power / Re: controlling stepper for a period of time rather than number of steps on: January 19, 2014, 06:50:11 am
Cheers jumbo will give it a whirl.

That's jImbo  smiley-wink, but you're welcome
1102  Using Arduino / Programming Questions / Re: Storing multiple values and then take average on: January 19, 2014, 06:11:11 am
You don't to store all the values read individually. Take the first reading and store it. Add all subsequent readings to the stored value. Finally, divide the stored value by the number of times the reading was taken. - Scotty

Yep that's what I do here:

Code:
// read and calc the temp
          temptotal=0;
          for(int x = 0; x < 100; x++) {
            rawVal=analogRead(5);    //Connect LM35 on Analog 5
            temp=(500 * rawVal) /1024;
            temptotal = temptotal + temp;
          }
          temp=temptotal/100;

1103  Topics / Robotics / Re: uArmⅠ:An open source robot arm on: January 19, 2014, 06:08:33 am
So most parts in hand: got all the bearings the other day, and fetching the standoffs tomorrow. Then just need all the screws and nuts, from a place just up the road..... so maybe next weekend we'll start assembly.

Current thinking, is to have the Arduino with Ethernet act as an HTCPCP server responding as contemplated in RFC2324 and have the arm do the work. (Error 418 notwithstanding).
1104  Using Arduino / Motors, Mechanics, and Power / Re: controlling stepper for a period of time rather than number of steps on: January 19, 2014, 05:22:26 am
I don't know much anything about accelstepper, but presumably it has a command like:

Code:
accelstepper.motor1(step);  // just guessing

... or something like that which makes it move one step?

If so, then you could have something like:

Code:
unsigned long timePeriod = ..... // how ever long you want the effect to last, in millis
startTime= millis();

do {
// whatever command it is that moves one step
} while ((millis()-startTime) < timePeriod);
1105  Using Arduino / Networking, Protocols, and Devices / Re: The Ethernet shield's 4 connections.... on: January 19, 2014, 04:52:06 am
I have decided that my next E'net project will be to construct a virtual coffee server, compliant with HTCPCP/1.0  as contemplated in RFC2324
1106  Using Arduino / Programming Questions / Re: 9V pin output id ? on: January 19, 2014, 04:24:18 am
"Diode Electro Luminescente" sounds so much better, especially when I say it out loud in my Peter Sellers "Inspector Clouseau" accent...   smiley-wink
1107  Using Arduino / Programming Questions / Re: How to undo a flipped state? on: January 19, 2014, 04:21:41 am
Quote
OK, so just adding "Serial.begin(9600);" to the setup screwed up the function of the whole sketch.
Adding the Serial.println("Boo"); screwed things up even more.

The code compiles correctly but when I run it on the Arduino it has a ton of unfavorable results.

Saying things were screwed up, or results were unfavourable, is of no use to anyone who may be trying to help.

I'm out, thanks for playing.

1108  Using Arduino / Programming Questions / Re: Storing multiple values and then take average on: January 19, 2014, 04:12:06 am
Until you have the average you won't know which readings to discard and then it's too late since you already used them to calculate the average which tells you to discard them.....

I use 100 for the number of readings on an LM35- even 1000 doesn't hold things up too long, and that minimises the effect of a few funnies like if there's an AC spike nearby or the dog farts, or whatever.
1109  Using Arduino / Programming Questions / Re: 9V pin output id ? on: January 19, 2014, 04:08:15 am
What's a DEL?

An LED?

Make sure you have a resistor in series....
1110  Using Arduino / Programming Questions / Re: 9V pin output id ? on: January 19, 2014, 03:51:05 am
If I understand it right, you have something across Vin and some other pin?

Well when the other pin is HIGH, the device will have no potential diff and be off; when the other pin is LOW, the device will have PD and be on.

So you make the other pin go high and low by setting it with pinMode once and then digitalWrites.

Vin doesn't have a pin number: it's not an I/O pin
Pages: 1 ... 72 73 [74] 75 76 ... 269