\doxysection{Me\+Encoder\+New Class Reference}
\hypertarget{class_me_encoder_new}{}\label{class_me_encoder_new}\index{MeEncoderNew@{MeEncoderNew}}


Driver for Me Encoder New module.  




{\ttfamily \#include $<$src/\+Me\+Encoder\+New.\+h$>$}

\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_me_encoder_new_af77b13a73ad1a190ce06516cb1ec8591}{Me\+Encoder\+New}} (uint8\+\_\+t addr, uint8\+\_\+t slot)
\item 
\mbox{\hyperlink{class_me_encoder_new_a49faf6de7d40df69dc08edb424086390}{Me\+Encoder\+New}} (uint8\+\_\+t slot)
\item 
\mbox{\hyperlink{class_me_encoder_new_a809786152a62ec4d737f45a3cc8d3ea0}{Me\+Encoder\+New}} (void)
\item 
void \mbox{\hyperlink{class_me_encoder_new_a7502d17074b0de59a44406f1c67aa1fa}{begin}} (void)
\item 
void \mbox{\hyperlink{class_me_encoder_new_a6bf91a91af5bde030d9656e3314d0c96}{set\+Addr}} (uint8\+\_\+t i2c\+Addr, uint8\+\_\+t slot)
\item 
void \mbox{\hyperlink{class_me_encoder_new_a1b73a317a6ed28c0b6ee61899da4c2ff}{reset}} (void)
\item 
void \mbox{\hyperlink{class_me_encoder_new_abe1fe2665edfaae677ed00eea1fef040}{move}} (long angle, float speed=220, float lock\+\_\+state=1)
\item 
void \mbox{\hyperlink{class_me_encoder_new_a2b9316c366c67ef88b6f03635f8c9468}{move\+To}} (long angle, float speed=220, float lock\+\_\+state=1)
\item 
void \mbox{\hyperlink{class_me_encoder_new_ab7c6be174df72535937b1bc640d07b3a}{run\+Turns}} (long turns, float speed=220, float lock\+\_\+state=1)
\item 
void \mbox{\hyperlink{class_me_encoder_new_a37dc43618ad8f23e690dd1d39fe13edb}{run\+Speed}} (float speed, float lock\+\_\+state=1)
\item 
float \mbox{\hyperlink{class_me_encoder_new_a15f163ff89aeba26ea17be4a3b77737f}{get\+Current\+Speed}} (void)
\item 
void \mbox{\hyperlink{class_me_encoder_new_a36caaf02601282f0a5543c1f115bca15}{set\+Current\+Position}} (long pulse\+\_\+counter)
\item 
long \mbox{\hyperlink{class_me_encoder_new_ab161f5bd122c55b9564f8ce1263a8c0b}{get\+Current\+Position}} (void)
\item 
void \mbox{\hyperlink{class_me_encoder_new_ab6575651faefb9e22c73305d79655c76}{set\+Speed\+PID}} (float p, float i, float d)
\item 
void \mbox{\hyperlink{class_me_encoder_new_a7314cbf995b8b11fc954d12f96302fe5}{set\+Pos\+PID}} (float p, float i, float d)
\item 
void \mbox{\hyperlink{class_me_encoder_new_afe29430100b70233abc4f991bb2e27be}{get\+Speed\+PID}} (float \texorpdfstring{$\ast$}{*}p, float \texorpdfstring{$\ast$}{*}i, float \texorpdfstring{$\ast$}{*}d)
\item 
void \mbox{\hyperlink{class_me_encoder_new_a8729ee00ccdf13ebb0385b29de057320}{get\+Pos\+PID}} (float \texorpdfstring{$\ast$}{*}p, float \texorpdfstring{$\ast$}{*}i, float \texorpdfstring{$\ast$}{*}d)
\item 
float \mbox{\hyperlink{class_me_encoder_new_a476f3a1e0364be857b07b238cdf9eb08}{get\+Ratio}} (void)
\item 
void \mbox{\hyperlink{class_me_encoder_new_a033ffc24a1a7c2ea2bba48afb86b9ee2}{set\+Ratio}} (float r)
\item 
int \mbox{\hyperlink{class_me_encoder_new_a4cee6129526a9d8c3111acb61a9d3a88}{get\+Pulse}} (void)
\item 
void \mbox{\hyperlink{class_me_encoder_new_a658cae48c69e374ee22d29fd54b8f5ab}{set\+Pulse}} (int p)
\item 
void \mbox{\hyperlink{class_me_encoder_new_a800797c599c551731a65225f459a076a}{set\+Devid}} (uint8\+\_\+t devid)
\item 
void \mbox{\hyperlink{class_me_encoder_new_a8a54a728b9077dcd0e95a0277d54fcb3}{set\+Mode}} (uint8\+\_\+t mode)
\item 
void \mbox{\hyperlink{class_me_encoder_new_ad642ecd7bbb1015d5dab74ffce7b3b04}{set\+PWM}} (int pwm)
\item 
void \mbox{\hyperlink{class_me_encoder_new_a8b93e11a6d0ba0cedbc8e4a4ae44471b}{run\+Speed\+And\+Time}} (float speed, float time, float lock\+\_\+state=1)
\item 
boolean \mbox{\hyperlink{class_me_encoder_new_a0fec98e0dcfd4d1df08039810f450f6d}{is\+Tar\+Pos\+Reached}} (void)
\item 
void \mbox{\hyperlink{class_me_encoder_new_a02ff4e42930711e7ab228f25b80e045c}{get\+Firmware\+Version}} (char \texorpdfstring{$\ast$}{*}buffer)
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Driver for Me Encoder New module. 

Class\+: \doxylink{class_me_encoder_new}{Me\+Encoder\+New} \begin{DoxyParagraph}{Description}
Declaration of Class \doxylink{class_me_encoder_new}{Me\+Encoder\+New}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Copyright (C), 2012-\/2016, Make\+Block}

\end{DoxyParagraph}


\doxysubsection{Constructor \& Destructor Documentation}
\Hypertarget{class_me_encoder_new_af77b13a73ad1a190ce06516cb1ec8591}\label{class_me_encoder_new_af77b13a73ad1a190ce06516cb1ec8591} 
\index{MeEncoderNew@{MeEncoderNew}!MeEncoderNew@{MeEncoderNew}}
\index{MeEncoderNew@{MeEncoderNew}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{MeEncoderNew()}{MeEncoderNew()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily Me\+Encoder\+New\+::\+Me\+Encoder\+New (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{addr,  }\item[{uint8\+\_\+t}]{slot }\end{DoxyParamCaption})}

Alternate Constructor which can call your own function to map the Encoder Motor New to arduino port, you can set any slot for the Encoder Motor New device. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em port} & -\/ RJ25 port from PORT\+\_\+1 to PORT\+\_\+10 \\
\hline
\mbox{\texttt{ in}}  & {\em slot} & -\/ SLOT1 or SLOT2 \\
\hline
\end{DoxyParams}
\Hypertarget{class_me_encoder_new_a49faf6de7d40df69dc08edb424086390}\label{class_me_encoder_new_a49faf6de7d40df69dc08edb424086390} 
\index{MeEncoderNew@{MeEncoderNew}!MeEncoderNew@{MeEncoderNew}}
\index{MeEncoderNew@{MeEncoderNew}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{MeEncoderNew()}{MeEncoderNew()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily Me\+Encoder\+New\+::\+Me\+Encoder\+New (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{slot }\end{DoxyParamCaption})}

Alternate Constructor which can call your own function to map the Encoder Motor New to arduino port, you can set any slot for the Encoder Motor New device. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em slot} & -\/ SLOT1 or SLOT2 \\
\hline
\end{DoxyParams}
\Hypertarget{class_me_encoder_new_a809786152a62ec4d737f45a3cc8d3ea0}\label{class_me_encoder_new_a809786152a62ec4d737f45a3cc8d3ea0} 
\index{MeEncoderNew@{MeEncoderNew}!MeEncoderNew@{MeEncoderNew}}
\index{MeEncoderNew@{MeEncoderNew}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{MeEncoderNew()}{MeEncoderNew()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily Me\+Encoder\+New\+::\+Me\+Encoder\+New (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

Alternate Constructor which can call your own function to map the Encoder Motor New to arduino port, you should initialized slot and slave\+Address here for the Encoder Motor New device. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em None} & \\
\hline
\end{DoxyParams}


\doxysubsection{Member Function Documentation}
\Hypertarget{class_me_encoder_new_a7502d17074b0de59a44406f1c67aa1fa}\label{class_me_encoder_new_a7502d17074b0de59a44406f1c67aa1fa} 
\index{MeEncoderNew@{MeEncoderNew}!begin@{begin}}
\index{begin@{begin}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{begin()}{begin()}}
{\footnotesize\ttfamily void Me\+Encoder\+New\+::begin (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
begin 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Initialize Encoder Motor New. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em None} & \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_ab161f5bd122c55b9564f8ce1263a8c0b}\label{class_me_encoder_new_ab161f5bd122c55b9564f8ce1263a8c0b} 
\index{MeEncoderNew@{MeEncoderNew}!getCurrentPosition@{getCurrentPosition}}
\index{getCurrentPosition@{getCurrentPosition}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{getCurrentPosition()}{getCurrentPosition()}}
{\footnotesize\ttfamily long Me\+Encoder\+New\+::get\+Current\+Position (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
get\+Current\+Position 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
The current position of Motor. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em None} & \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
Motor encoder pulse count value. 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_a15f163ff89aeba26ea17be4a3b77737f}\label{class_me_encoder_new_a15f163ff89aeba26ea17be4a3b77737f} 
\index{MeEncoderNew@{MeEncoderNew}!getCurrentSpeed@{getCurrentSpeed}}
\index{getCurrentSpeed@{getCurrentSpeed}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{getCurrentSpeed()}{getCurrentSpeed()}}
{\footnotesize\ttfamily float Me\+Encoder\+New\+::get\+Current\+Speed (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
get\+Current\+Speed 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
The current speed of Motor\textquotesingle{}s movement. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em None} & \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
The speed of encoder motor(\+The unit is rpm) 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_a02ff4e42930711e7ab228f25b80e045c}\label{class_me_encoder_new_a02ff4e42930711e7ab228f25b80e045c} 
\index{MeEncoderNew@{MeEncoderNew}!getFirmwareVersion@{getFirmwareVersion}}
\index{getFirmwareVersion@{getFirmwareVersion}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{getFirmwareVersion()}{getFirmwareVersion()}}
{\footnotesize\ttfamily void Me\+Encoder\+New\+::get\+Firmware\+Version (\begin{DoxyParamCaption}\item[{char \texorpdfstring{$\ast$}{*}}]{buffer }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
get\+Firmware\+Version 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Get Firmware Version, Only support Encode\+Driver-\/\+V2.\+1.\+0 module firmware 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em None} & \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
buffer\+: for storage version, length greater than 8 
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}
\begin{DoxyParagraph}{Others}

\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_a8729ee00ccdf13ebb0385b29de057320}\label{class_me_encoder_new_a8729ee00ccdf13ebb0385b29de057320} 
\index{MeEncoderNew@{MeEncoderNew}!getPosPID@{getPosPID}}
\index{getPosPID@{getPosPID}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{getPosPID()}{getPosPID()}}
{\footnotesize\ttfamily void Me\+Encoder\+New\+::get\+Pos\+PID (\begin{DoxyParamCaption}\item[{float \texorpdfstring{$\ast$}{*}}]{p,  }\item[{float \texorpdfstring{$\ast$}{*}}]{i,  }\item[{float \texorpdfstring{$\ast$}{*}}]{d }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
get\+Pos\+PID 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Get PID from Motor. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em p} & -\/ P means Proportion. \\
\hline
\mbox{\texttt{ in}}  & {\em i} & -\/ I means Integration. \\
\hline
\mbox{\texttt{ in}}  & {\em d} & -\/ D means Differentiation. \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_a4cee6129526a9d8c3111acb61a9d3a88}\label{class_me_encoder_new_a4cee6129526a9d8c3111acb61a9d3a88} 
\index{MeEncoderNew@{MeEncoderNew}!getPulse@{getPulse}}
\index{getPulse@{getPulse}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{getPulse()}{getPulse()}}
{\footnotesize\ttfamily int Me\+Encoder\+New\+::get\+Pulse (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
get\+Pulse 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Get the pulse of Motor. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em None} & \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
Return the pulse of Motor. 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_a476f3a1e0364be857b07b238cdf9eb08}\label{class_me_encoder_new_a476f3a1e0364be857b07b238cdf9eb08} 
\index{MeEncoderNew@{MeEncoderNew}!getRatio@{getRatio}}
\index{getRatio@{getRatio}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{getRatio()}{getRatio()}}
{\footnotesize\ttfamily float Me\+Encoder\+New\+::get\+Ratio (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
get\+Ratio 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Get the ratio of Motor. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em None} & \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
Return the ratio of Motor. 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_afe29430100b70233abc4f991bb2e27be}\label{class_me_encoder_new_afe29430100b70233abc4f991bb2e27be} 
\index{MeEncoderNew@{MeEncoderNew}!getSpeedPID@{getSpeedPID}}
\index{getSpeedPID@{getSpeedPID}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{getSpeedPID()}{getSpeedPID()}}
{\footnotesize\ttfamily void Me\+Encoder\+New\+::get\+Speed\+PID (\begin{DoxyParamCaption}\item[{float \texorpdfstring{$\ast$}{*}}]{p,  }\item[{float \texorpdfstring{$\ast$}{*}}]{i,  }\item[{float \texorpdfstring{$\ast$}{*}}]{d }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
get\+Speed\+PID 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Get Speed PID from Motor. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em p} & -\/ P means Proportion. \\
\hline
\mbox{\texttt{ in}}  & {\em i} & -\/ I means Integration. \\
\hline
\mbox{\texttt{ in}}  & {\em d} & -\/ D means Differentiation. \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None
\end{DoxyParagraph}
\begin{DoxyParagraph}{Function}
get\+Speed\+PID 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Get PID from Motor. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em p} & -\/ P means Proportion. \\
\hline
\mbox{\texttt{ in}}  & {\em i} & -\/ I means Integration. \\
\hline
\mbox{\texttt{ in}}  & {\em d} & -\/ D means Differentiation. \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_a0fec98e0dcfd4d1df08039810f450f6d}\label{class_me_encoder_new_a0fec98e0dcfd4d1df08039810f450f6d} 
\index{MeEncoderNew@{MeEncoderNew}!isTarPosReached@{isTarPosReached}}
\index{isTarPosReached@{isTarPosReached}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{isTarPosReached()}{isTarPosReached()}}
{\footnotesize\ttfamily boolean Me\+Encoder\+New\+::is\+Tar\+Pos\+Reached (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
is\+Tar\+Pos\+Reached 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Check whether the target position has been reached 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em None} & \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
true -\/ The target position reaches false -\/ Does not reach the target position 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_abe1fe2665edfaae677ed00eea1fef040}\label{class_me_encoder_new_abe1fe2665edfaae677ed00eea1fef040} 
\index{MeEncoderNew@{MeEncoderNew}!move@{move}}
\index{move@{move}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{move()}{move()}}
{\footnotesize\ttfamily void Me\+Encoder\+New\+::move (\begin{DoxyParamCaption}\item[{long}]{angle,  }\item[{float}]{speed = {\ttfamily 220},  }\item[{float}]{lock\+\_\+state = {\ttfamily 1} }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
move 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Motor move. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em angle} & -\/ The angle move of Motor New. \\
\hline
\mbox{\texttt{ in}}  & {\em speed} & -\/ The speed move of Motor New. \\
\hline
\mbox{\texttt{ in}}  & {\em lock\+\_\+state} & -\/ The lock state of Motor. \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_a2b9316c366c67ef88b6f03635f8c9468}\label{class_me_encoder_new_a2b9316c366c67ef88b6f03635f8c9468} 
\index{MeEncoderNew@{MeEncoderNew}!moveTo@{moveTo}}
\index{moveTo@{moveTo}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{moveTo()}{moveTo()}}
{\footnotesize\ttfamily void Me\+Encoder\+New\+::move\+To (\begin{DoxyParamCaption}\item[{long}]{angle,  }\item[{float}]{speed = {\ttfamily 220},  }\item[{float}]{lock\+\_\+state = {\ttfamily 1} }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
move\+To 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Motor New move to the aim. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em angle} & -\/ The angle move of Motor New. \\
\hline
\mbox{\texttt{ in}}  & {\em speed} & -\/ The speed move of Motor New. \\
\hline
\mbox{\texttt{ in}}  & {\em lock\+\_\+state} & -\/ The lock state of Motor. \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_a1b73a317a6ed28c0b6ee61899da4c2ff}\label{class_me_encoder_new_a1b73a317a6ed28c0b6ee61899da4c2ff} 
\index{MeEncoderNew@{MeEncoderNew}!reset@{reset}}
\index{reset@{reset}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{reset()}{reset()}}
{\footnotesize\ttfamily void Me\+Encoder\+New\+::reset (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
reset 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Reset the parameter of Motor. 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_a37dc43618ad8f23e690dd1d39fe13edb}\label{class_me_encoder_new_a37dc43618ad8f23e690dd1d39fe13edb} 
\index{MeEncoderNew@{MeEncoderNew}!runSpeed@{runSpeed}}
\index{runSpeed@{runSpeed}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{runSpeed()}{runSpeed()}}
{\footnotesize\ttfamily void Me\+Encoder\+New\+::run\+Speed (\begin{DoxyParamCaption}\item[{float}]{speed,  }\item[{float}]{lock\+\_\+state = {\ttfamily 1} }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
run\+Speed 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
The speed of Motor\textquotesingle{}s movement. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em speed} & -\/ The speed move of Motor. \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None
\end{DoxyParagraph}
\begin{DoxyParagraph}{Function}
run\+Speed 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
The speed of Motor\textquotesingle{}s movement. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em speed} & -\/ The speed move of Motor. \\
\hline
\mbox{\texttt{ in}}  & {\em lock\+\_\+state} & -\/ The lock state of Motor. \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_a8b93e11a6d0ba0cedbc8e4a4ae44471b}\label{class_me_encoder_new_a8b93e11a6d0ba0cedbc8e4a4ae44471b} 
\index{MeEncoderNew@{MeEncoderNew}!runSpeedAndTime@{runSpeedAndTime}}
\index{runSpeedAndTime@{runSpeedAndTime}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{runSpeedAndTime()}{runSpeedAndTime()}}
{\footnotesize\ttfamily void Me\+Encoder\+New\+::run\+Speed\+And\+Time (\begin{DoxyParamCaption}\item[{float}]{speed,  }\item[{float}]{time,  }\item[{float}]{lock\+\_\+state = {\ttfamily 1} }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
run\+Speed\+And\+Time 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
The speed and time of Motor\textquotesingle{}s movement. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em speed} & -\/ The speed move of Motor. \\
\hline
\mbox{\texttt{ in}}  & {\em time} & -\/ The time move of Motor. \\
\hline
\mbox{\texttt{ in}}  & {\em lock\+\_\+state} & -\/ The lock state of Motor. \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_ab7c6be174df72535937b1bc640d07b3a}\label{class_me_encoder_new_ab7c6be174df72535937b1bc640d07b3a} 
\index{MeEncoderNew@{MeEncoderNew}!runTurns@{runTurns}}
\index{runTurns@{runTurns}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{runTurns()}{runTurns()}}
{\footnotesize\ttfamily void Me\+Encoder\+New\+::run\+Turns (\begin{DoxyParamCaption}\item[{long}]{turns,  }\item[{float}]{speed = {\ttfamily 220},  }\item[{float}]{lock\+\_\+state = {\ttfamily 1} }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
run\+Turns 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Motor move turns. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em turns} & -\/ The turns move of Motor. \\
\hline
\mbox{\texttt{ in}}  & {\em speed} & -\/ The speed move of Motor. \\
\hline
\mbox{\texttt{ in}}  & {\em lock\+\_\+state} & -\/ The lock state of Motor. \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_a6bf91a91af5bde030d9656e3314d0c96}\label{class_me_encoder_new_a6bf91a91af5bde030d9656e3314d0c96} 
\index{MeEncoderNew@{MeEncoderNew}!setAddr@{setAddr}}
\index{setAddr@{setAddr}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{setAddr()}{setAddr()}}
{\footnotesize\ttfamily void Me\+Encoder\+New\+::set\+Addr (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{i2c\+Addr,  }\item[{uint8\+\_\+t}]{slot }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
set\+Addr 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Reset the i2c address of encoder motor . 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em i2c\+Addr} & -\/ i2c address of encoder motor \\
\hline
\mbox{\texttt{ in}}  & {\em slot} & -\/ slot number of encoder motor \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_a36caaf02601282f0a5543c1f115bca15}\label{class_me_encoder_new_a36caaf02601282f0a5543c1f115bca15} 
\index{MeEncoderNew@{MeEncoderNew}!setCurrentPosition@{setCurrentPosition}}
\index{setCurrentPosition@{setCurrentPosition}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{setCurrentPosition()}{setCurrentPosition()}}
{\footnotesize\ttfamily void Me\+Encoder\+New\+::set\+Current\+Position (\begin{DoxyParamCaption}\item[{long}]{pulse\+\_\+counter }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
set\+Current\+Position 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Set current position of Motor. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em pulse\+\_\+counter} & -\/ The count value of current encoder \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_a800797c599c551731a65225f459a076a}\label{class_me_encoder_new_a800797c599c551731a65225f459a076a} 
\index{MeEncoderNew@{MeEncoderNew}!setDevid@{setDevid}}
\index{setDevid@{setDevid}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{setDevid()}{setDevid()}}
{\footnotesize\ttfamily void Me\+Encoder\+New\+::set\+Devid (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{devid }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
set\+Devid 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Set the devid to Motor. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em devid} & -\/ the I2C adress \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_a8a54a728b9077dcd0e95a0277d54fcb3}\label{class_me_encoder_new_a8a54a728b9077dcd0e95a0277d54fcb3} 
\index{MeEncoderNew@{MeEncoderNew}!setMode@{setMode}}
\index{setMode@{setMode}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{setMode()}{setMode()}}
{\footnotesize\ttfamily void Me\+Encoder\+New\+::set\+Mode (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{mode }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
set\+Mode 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Set the work mode to Motor. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em mode} & -\/ The work mode of Motor. \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_a7314cbf995b8b11fc954d12f96302fe5}\label{class_me_encoder_new_a7314cbf995b8b11fc954d12f96302fe5} 
\index{MeEncoderNew@{MeEncoderNew}!setPosPID@{setPosPID}}
\index{setPosPID@{setPosPID}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{setPosPID()}{setPosPID()}}
{\footnotesize\ttfamily void Me\+Encoder\+New\+::set\+Pos\+PID (\begin{DoxyParamCaption}\item[{float}]{p,  }\item[{float}]{i,  }\item[{float}]{d }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
set\+Pos\+PID 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Set pos PID for Motor. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em p} & -\/ P means Proportion. \\
\hline
\mbox{\texttt{ in}}  & {\em i} & -\/ I means Integration. \\
\hline
\mbox{\texttt{ in}}  & {\em d} & -\/ D means Differentiation. \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_a658cae48c69e374ee22d29fd54b8f5ab}\label{class_me_encoder_new_a658cae48c69e374ee22d29fd54b8f5ab} 
\index{MeEncoderNew@{MeEncoderNew}!setPulse@{setPulse}}
\index{setPulse@{setPulse}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{setPulse()}{setPulse()}}
{\footnotesize\ttfamily void Me\+Encoder\+New\+::set\+Pulse (\begin{DoxyParamCaption}\item[{int}]{pulse }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
set\+Pulse 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Set the pulse to Motor. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em pulse} & -\/ the line number of Motor \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_ad642ecd7bbb1015d5dab74ffce7b3b04}\label{class_me_encoder_new_ad642ecd7bbb1015d5dab74ffce7b3b04} 
\index{MeEncoderNew@{MeEncoderNew}!setPWM@{setPWM}}
\index{setPWM@{setPWM}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{setPWM()}{setPWM()}}
{\footnotesize\ttfamily void Me\+Encoder\+New\+::set\+PWM (\begin{DoxyParamCaption}\item[{int}]{pwm }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
set\+PWM 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Set the PWM to Motor. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em pwm} & -\/ Pulse-\/\+Width Modulation. \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_a033ffc24a1a7c2ea2bba48afb86b9ee2}\label{class_me_encoder_new_a033ffc24a1a7c2ea2bba48afb86b9ee2} 
\index{MeEncoderNew@{MeEncoderNew}!setRatio@{setRatio}}
\index{setRatio@{setRatio}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{setRatio()}{setRatio()}}
{\footnotesize\ttfamily void Me\+Encoder\+New\+::set\+Ratio (\begin{DoxyParamCaption}\item[{float}]{ratio }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
set\+Ratio 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Set the ratio to Motor. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ratio} & -\/ the ratio of Motor \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_encoder_new_ab6575651faefb9e22c73305d79655c76}\label{class_me_encoder_new_ab6575651faefb9e22c73305d79655c76} 
\index{MeEncoderNew@{MeEncoderNew}!setSpeedPID@{setSpeedPID}}
\index{setSpeedPID@{setSpeedPID}!MeEncoderNew@{MeEncoderNew}}
\doxysubsubsection{\texorpdfstring{setSpeedPID()}{setSpeedPID()}}
{\footnotesize\ttfamily void Me\+Encoder\+New\+::set\+Speed\+PID (\begin{DoxyParamCaption}\item[{float}]{p,  }\item[{float}]{i,  }\item[{float}]{d }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
set\+Speed\+PID 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Set speed PID for Motor. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em p} & -\/ P means Proportion. \\
\hline
\mbox{\texttt{ in}}  & {\em i} & -\/ I means Integration. \\
\hline
\mbox{\texttt{ in}}  & {\em d} & -\/ D means Differentiation. \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Return}
None 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}


The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
src/\mbox{\hyperlink{_me_encoder_new_8h}{Me\+Encoder\+New.\+h}}\item 
src/\mbox{\hyperlink{_me_encoder_new_8cpp}{Me\+Encoder\+New.\+cpp}}\end{DoxyCompactItemize}
