Urgent for a project help please


i'm using scratch coding arduino , don't know how digital input calculate speed.i have use digital input , use light sensor measure speed. know digital input can measure 0 , 1, imagine spinning wheel , has reach speed game start. wanna know how can make work. can see in attached picture did analog coding when light shines gives 1 score, digital part have no clue how it. ideas?

assuming digital sensor gives defined number pulses per rotation, measure duration between 2 pulses determine speed.

e.g. if have 10 pulses per rotation, , measure duration of 10 milliseconds between 2 pulses, have speed of 10 revolutions per second.


Arduino Forum > Using Arduino > Sensors > Urgent for a project help please


arduino

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code