|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Encoder help
How are you printing it? Note that the function returns a long integer. If you're trying to print it with a %d format, you'll only get the topmost two bytes.
|
|
#2
|
|||||
|
|||||
|
Re: Encoder help
Quote:
To print out the encoder count, you could typecast it to an int for printf: Code:
printf("Encoder 1 is %d\r\n", (int)Get_Encoder_1_Count());
I can't seem to find the documentation for the printf function, so I can't give you the %whatever value you need to make a long int print...I'm not even sure if it's possible directly. Just typecast it as I showed, and it should give you a good value out. JBot |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Encoder help | Windward | Programming | 21 | 14-01-2006 15:10 |
| Encoder code with hall effect sensors help | brownster | Programming | 10 | 19-02-2005 09:23 |
| Need Help with Encoder - Won't Count Clicks | Kingofl337 | Programming | 5 | 16-02-2005 18:30 |
| encoder.c | Gary Bonner | Programming | 2 | 14-01-2005 13:41 |
| shaft encoder help | stephenthe1 | Programming | 2 | 03-12-2004 16:09 |