pulsein function

hello everyone I'm using pulsein() function to read the values coming from an RF receiver, how ever there is a delay of one second when i change the position of the throttle stick. is there a way i can reduce this delay as it is required to control my motors in real time.... thank you

Hi,

Don't use pulsein.

Read this link from my blog -

http://rcarduino.blogspot.com/2012/01/how-to-read-rc-receiver-with.html

then this one -

http://rcarduino.blogspot.com/2012/04/how-to-read-multiple-rc-channels-draft.html

you might as well read the two links in my signature while you are at it.

Duane B

rcarduino.blogspot.com

rcarduino.blogspot.com

hello thank you for the links , very useful. so from what i understood pulsein cannot be used in an efficient way right? there is no way to reduce the time delay? thank you :)

Hi, Yes, you can reduce the delay, but don't, pulseIn is just wrong for what most people try and use it for.

Duane B

rcarduino.blogspot.com

oh ok great. thank you so much :) also i had problems compiling the codes i found on the links. can u help please. regards

Hi,
If your trying to compile the three channel example, you will need to install the pcintchange library first. To keep things simple for now, try the example in the first link for now, that doesn’t require any additional libraries.

Duane B