Go Down

Topic: Speed measurement using 2 Inductive sensor (Read 522 times) previous topic - next topic

Sanjay26121990

Hi everyone,

I am new to Arduino and working on a project in which I have to measure train speed using 2 Inductive senosrs.

I have 2 Inputs.

Output should be 5 bit Binary code.

I am getting Speed measurement in decimal values.
I tried to convert it in Binary but its showing always 8 bits.

Is there any way to get output exactly 5 bit Binary coded.

I have attached my code below.


Thank you very much


Sanjay26121990

Thank you for your reply.

I do have another query regarding this code.

I can run this whole loop only once.

but my requirment is whenever sensor goes from low to high, loop must run once

How can I do that?



Go Up