Quote:
Originally Posted by tommy0019
i am still rather confused on how to put the whole tachometer together. Is there an easier way to make the switch into a tachometer?
|
A tachometer is a device that measures the rotational speed of something. The switch is the sensor you're using to (try to) measure that speed.
Let's go ahead slowly with this, and let us know what of Ether's post isn't completely clear. We'll be happy to post a wall of text for you with great detail - we really really want you to understand this completely - but to save both of us time, just tell us what you need to start and we;ll walk you through the whole thing. Honest. We like to help, because this is both cool stuff and important to understand.
OK, maybe to get started: Write a sketch that will enable interrupts, and then increment a variable when the interrupt gets serviced.
Enabling interrupts is simple, but you have to learn what that one line should look like and type it in yourself.
Them, you write a 'subroutine' that, when the interrupt takes place, runs the formula N=N+1 (where N is your variable, you need to declare this, I suggest globally for the moment, and also set N=0 but put it where it will only set it to 0 one time).
Is this completely understood? If not, tell us what isn't, even if you think it is a very dumb or simple question. It is OK, we all started somewhere...