Show Posts
Pages: 1 ... 1069 1070 [1071] 1072 1073 ... 1896
16051  Using Arduino / Project Guidance / Re: Arduino or sensor speed problems? on: April 16, 2012, 09:49:11 am
Quote
  if (wheelRevs == sector2){
And if you miss just one count?

(wheelRevs ought to be declared "volatile")

When I see stuff like this:
Code:
float s1fastestrun = 0; //sector times in fastest run - usd for calculating deltas to compare fastest run to current run
float s2fastestrun = 0;
float s3fastestrun = 0;
float s4fastestrun = 0;
I start to think "arrays".
16052  Using Arduino / Programming Questions / Re: Question about the external Interrupt ?? on: April 16, 2012, 09:37:50 am
How broad is the tape, and how fast is the object moving?
16053  Using Arduino / Programming Questions / Re: RGB Code not working. on: April 16, 2012, 09:35:39 am
Topics merged:
@OP: Please don't post the same question multiple times - it wastes time.
16054  Using Arduino / Programming Questions / Re: Is there an alternative to 38 Switch-case statements? on: April 16, 2012, 09:24:50 am
Lookup table(s)?
(though that's probably what the compiler makes the switch statement into)
16055  Using Arduino / Programming Questions / Re: Trouble with code, wanting to do this.. on: April 16, 2012, 09:17:48 am
NEED CODE

Thanks
16056  Using Arduino / LEDs and Multiplexing / Re: RGB LED color changing on: April 16, 2012, 09:17:14 am
Quote
digitalWrite() takes HIGH or LOW as argument, not a number.  So it's either ON or OFF.
Whilst it's true that the second argument is interpreted as ON or OFF, digitalWrite follows the C convention that zero is OFF, and non-zero is ON, and so any value in the range 1...255 inclusive will be interpreted as ON.

But, as noted, this probably isn't what the OP wanted.
16057  Using Arduino / Programming Questions / Re: Question about the external Interrupt ?? on: April 16, 2012, 09:10:42 am
Why don't you tell us what you want to do, not how you think you should do it?
Try not to use the abbreviation "cuz"
16058  Using Arduino / Programming Questions / Re: Problems with interrupt on: April 16, 2012, 08:51:06 am
1.0 uses interrupts for buffered serial output.
Prior to 1.0, serial output wasn't buffered and simply polled.
(it's nearly always a bad idea to do serial I/O in interrupts)
16059  Using Arduino / Programming Questions / Re: Problems with interrupt on: April 16, 2012, 08:38:11 am
Just save yourself further grief, and remove the serial prints from the ISR.
16060  Using Arduino / Programming Questions / Re: Library Servo.h period change on: April 16, 2012, 07:16:13 am
Code:
#define REFRESH_INTERVAL    2500
Or something along those lines?

But that's awfully close to
Code:
#define MAX_PULSE_WIDTH      2400
16061  Using Arduino / Programming Questions / Re: Problems with interrupt on: April 16, 2012, 06:46:43 am
Could your problem be the serial prints in the ISR?
16062  Using Arduino / Programming Questions / Re: Speed up arduino on: April 16, 2012, 06:39:24 am
Correct.
But since I didn't see any code to help you/us analyse the speed of the code, I thought I'd just add that comment.
16063  Using Arduino / Programming Questions / Re: Speed up arduino on: April 16, 2012, 05:34:31 am
Code:
Status_out = enable = Regler_Start = Init_Start = corr_Start = Auto_Status = 0 ;
Don't you trust the compiler to have done this for you?
16064  Using Arduino / Programming Questions / Re: 2D Array and total destruction on: April 16, 2012, 05:04:41 am
Code:
LCD.print("  Opening Harp  ");
When you were totting-up your arrays sizes, did you include strings?
16065  Using Arduino / Programming Questions / Re: Speed up arduino on: April 16, 2012, 05:01:59 am
Code:
fsrConductance = 1000000;           // we measure in micromhos so
    fsrConductance = fsrResistance;
I suppose you can hope the compiler optimises-out pointless assignments.
Pages: 1 ... 1069 1070 [1071] 1072 1073 ... 1896