Reaction time Mega R3 extremely slow

Hello,

I hope somone can help me..
I'm realy new to arduino and well, electronics in general actualy but i'm having a problem with my arduino mega r3 (i think).

I bought this mega for a project i want to built with a matrix of electro magnets and ferro fluid and started out with some simple examples like the one for the ping shield and for a capacitive touch sensor and i noticed that the reaction time of the arduino is extremely slow. For instance the touch sensor, when i look at the serial monitor i have a reaction time of 3900ms.. when i take out the code for the serial comm. it makes no difference, it takes about 4 seconds before a led starts to light up after i touch the sensor.. i think i'm just missing something but i can't figure out what it is.

I realy hope someone can help me out..

Thanks in advance!

p.s.

I checked the serial connection and this works fine, everything i send is echo'd back without any visible delay..

Anne

i think i'm just missing something .

So are we.

So are we.

Hmmmm.. well, don't we all..

Do you want to keep up the witty banter, or actually post some details, like code, schematic, observations, debug output..?

Read this before posting a programming question

For instance the touch sensor, when i look at the serial monitor i have a reaction time of 3900ms ...

Do you have this in your code?

delay (3899);

Without seeing it, of course, we can't tell.

We can't help you unless you post your code.

Anne404:
I realy hope someone can help me out..

The problem is probably in your code.

yes it was the code...

in the example code of the capacitive sensor there are 3 inputs, i only wired 1 of them so it always timed out on the other two....

next time i'll wait a week before i'll post..

thanks to all who replied!

And now let's continue the witty banter XD

OK, no worries - glad you found it.
Sorry if that was a bit rough - belated welcome.

Wait, what if I come here only for the witty banter?

Lefty

next time i'll wait a week before i'll post..

Somehow the msg got mangled. Too subtle, maybe. The moderator is named HAL. To a new
poster on their very "first" post, someone should say, click on the # icon and display your code,

code goes here

fix comes here.

Wait, what if I come here only for the witty banter?

  1. wait.
  2. go to 1.

oric_dan(333):

Wait, what if I come here only for the witty banter?

  1. wait.
  2. go to 1.

I left the Basic language behind long ago, probably before you were born, but thanks anyway. :wink:

Lefty

while( 1 ) ;

oric_dan(333):
while( 1 ) ;

Warning bug! I suspect you were suggesting I should just while(1) {}

Lefty

.... . .-.. .--. -- .

while(1); compiles fine.

oric_dan(333):
.... . .-.. .--. -- .

while(1); compiles fine.

That is why a called it a bug not an error, it doesn't end up waiting for any length of time.

oric_dan(333):

  1. wait.
  2. go to 1.
while (true)
  delay (1000);