pulsin command
Tobias
Posts: 95
I am using a truck speed sensor for my pulsin I not sure that my code is correct, I am trying to display the value in the debug terminal in mph. Your help will be greatly appreciated. Thank-You
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
mph var word
main:
pulsin 8, 1, mph ' Get reading
debug 2,1,1, "mph ", dec3 mph ' Display mph
goto main ' around forever
Also, you are debugging a Word, which could have a lot more than 3 digits -- you might want to see the value of the whole variable during testing.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
You are best off using the COUNT command in this case, though PULSIN would work too.
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
StampPlot - Graphical Data Acquisition and Control
AppBee -·2.4GHz Wireless Adapters & transceivers·for the BASIC Stamp & Other controllers·
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
StampPlot - Graphical Data Acquisition and Control
AppBee -·2.4GHz Wireless Adapters & transceivers·for the BASIC Stamp & Other controllers·