Tachometer, help me plz!
Manuel
Posts: 105
Hello im a highschool stundent yet and want to make a tachometer with my bs2sx, i was thinking of using an optical switch to count the turns but yet im having trouble to use it with my Basic stamp, if anyone has an idea, suggetion or anything to say, i would really apreciate it.
Best Regards
Manuel C. Reinhard
·
Best Regards
Manuel C. Reinhard
·
Comments
bugg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Boe-bot: $229
Toddler: $249
Learning Google is your friend: priceless
·· It might be a bit easier to help you if we knew the problem.· We know what you're trying to do, but not what problems you're having.· What do you have, what's it connected to, and what's happening?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Thanks
Best Regards
Manuel C. Reinahrd
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
What im doing is (incomplete only to show my problem)
q var word
meters ver word (this variable is comonly 400)
q = ((meters*100)/1885) * 100
the results comonly are two digits and two zeros, result of the arrival to the decimal place.
Is it posible to have variables bigger than a word so i could make my operation q = ((meters*10000)/1885) ?
Because in that way i would not loose my last two numbers
Thanks for the help.
Best Regards
Manuel C. Reinhard
· q = meters ** 12353
How did I get 12353?· Multiply 0.1885 * 65536.· See Dr. Tracy Allen's web site (www.emesystems.com) for excellent examples of using */ and **.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Thx for all the help.
But now i got another problem , i want to be meassuring a hall efect sensor so when it reaches the same value of my variable q something happens.
my idea is the use of the lookdown and in some other way to increase a variable each time the sensor senses the magnet.
My idea is this:
' {$Stamp BS2sx}
part_two:
button 1, 1, 10, 20 , enter, 1, continue
pause 20 (2.5 times as on the BS2)
Lookdown counting, [noparse][[/noparse]q], go_on
goto part_two
continue:
counting = counting+1
goto part_two
go_on:
more actions...
Any corrections or improvements will be appreaciated
Best Regards
Manuel C. Reinhard
·
Ah, Im late to post, the ** and */ should provide a quicker result.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
i tried the ** and */, but the number goes around 65536, i will try your qmod operations.
Thanks a lot
Best Regards
Manuel C. Reinhard
Like if i put a magnet in front of it i get a 1 and if not i get a 0?
Best Regards
Manuel C. Reinhard
I changed my circuitry from downstate=1 to downstate=0 and i also changed my code from
ex.
button 3 , 1, 10 , 20, enter, 1, prepare
to
button 3 , 0, 10 , 20, enter, 1, prepare
and it will go on as if the buttons were pressed.
anyone has any idea?
Best Regards
Manuel C. Reinhard