Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   C++ Encoder Help Needed (http://www.chiefdelphi.com/forums/showthread.php?t=124925)

Frostivious 19-01-2014 17:35

C++ Encoder Help Needed
 
So this is our first year using c++ and we were wondering if anyone could help us get encoders working. Things we need to know is how to get it to print to Smart Dashboard, well actually we just need help in general...

Sparkyshires 19-01-2014 19:57

Re: C++ Encoder Help Needed
 
for one, if I can ask, why do you need to print it to the dashboard? As to how else to use it, initialize it using the encoder class and check the WPI library for its functions. the main one's you need to know are .Get() which gives you the value, and .Reset() which resets the encoder.

phynix 19-01-2014 20:31

Re: C++ Encoder Help Needed
 
You also need to Start() them, otherwise they won't begin counting.

Sparkyshires 19-01-2014 21:43

Re: C++ Encoder Help Needed
 
Quote:

Originally Posted by phynix (Post 1329481)
You also need to Start() them, otherwise they won't begin counting.

Yup, thats true. I was just working with gyros, totally forgot sensors needed to be initialized xD

Dinoyan 19-01-2014 21:51

Re: C++ Encoder Help Needed
 
Tutorials on C++ and Encoder (page 49)

http://first.wpi.edu/Images/CMS/Firs...ming_Guide.pdf

Joe Ross 19-01-2014 23:05

Re: C++ Encoder Help Needed
 
Quote:

Originally Posted by Dinoyan (Post 1329517)
Tutorials on C++ and Encoder (page 49)

http://first.wpi.edu/Images/CMS/Firs...ming_Guide.pdf

This document is quite old. The latest documentation is now at http://wpilib.screenstepslive.com/s/3120 (Getting Started with C++ and WPILib Programming). The encoder documentation is at http://wpilib.screenstepslive.com/s/...using-encoders


All times are GMT -5. The time now is 12:04.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi