I have viewed a example to quad encoder counting number.so i modified it to show decimal number with encoder.but problem is its show int number insted of decimal number
i have attached the project.where was the problem in code?
Quad encoder help
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Quad encoder help
Hi, pollob00.
Instead of
Try instead
Without the preceding Float, then the float changed to an interger before being displayed on LCD.
If you are still having an issue, then precede Count: with the FLOAT key word:
If you want to display the float to 2 decimal places for example you can use
Instead of
Code: Select all
dis = ToString$ (rty)
Code: Select all
dis = FloatToString$ (rty)
Without the preceding Float, then the float changed to an interger before being displayed on LCD.
If you are still having an issue, then precede Count:
Code: Select all
rty = Count
Code: Select all
rty = FLOAT Count
Code: Select all
dis = FloatToString$ (rty,2)
Martin
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Quad encoder help
Can you attached your modified flowchart and I will take a look at it, and see if I can spot the issue?
Martin