\hypertarget{MyroC_8h}{\section{Myro\-C.\-h File Reference}
\label{MyroC_8h}\index{Myro\-C.\-h@{Myro\-C.\-h}}
}


Header for a C-\/based, my-\/robot package for the Scribbler 2.  


\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structPixel}{Pixel}
\begin{DoxyCompactList}\small\item\em Struct for a pixel. \end{DoxyCompactList}\item 
struct \hyperlink{structPicture}{Picture}
\begin{DoxyCompactList}\small\item\em Struct for a picture object. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{MyroC_8h_aadfc48e2707da0e4f1f01e6aa14b6ef4}{r\-Connect} (const char $\ast$address)
\begin{DoxyCompactList}\small\item\em connects program to Scribbler \end{DoxyCompactList}\item 
\hypertarget{MyroC_8h_a169e562028db3fcbbe8ab6a35476bbb8}{void \hyperlink{MyroC_8h_a169e562028db3fcbbe8ab6a35476bbb8}{r\-Disconnect} ()}\label{MyroC_8h_a169e562028db3fcbbe8ab6a35476bbb8}

\begin{DoxyCompactList}\small\item\em disconnect program from Scribbler \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_a3c53b72530db178106d17242b205a196}{r\-Set\-Connection} (int new\-\_\-socket\-\_\-num)
\begin{DoxyCompactList}\small\item\em set current connection to the socket number \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_aa46e349ecd38fc90f8d7cea9bb8678d6}{r\-Beep} (double duration, int frequency)
\begin{DoxyCompactList}\small\item\em Beeps with the given duration and frequency. \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_a37ccc278b3ecca6290debf1929d1e479}{r\-Beep2} (double duration, int freq1, int freq2)
\begin{DoxyCompactList}\small\item\em Generates two notes for the prescribed duration. \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_ab6f8b6b28334162e70f7cf3a3b165e4b}{r\-Set\-Name} (const char $\ast$name)
\begin{DoxyCompactList}\small\item\em Change name stored in the robot to the 16-\/byte name given. \end{DoxyCompactList}\item 
const char $\ast$ \hyperlink{MyroC_8h_a881bb425d86ebb8caacd6be66c2f8a37}{r\-Get\-Name} ()
\begin{DoxyCompactList}\small\item\em Get the name of the robot. \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_a3753b86dcb4de002e8456501ca35edae}{r\-Set\-Forwardness} (char $\ast$direction)
\begin{DoxyCompactList}\small\item\em specifies which end of the Scribbler is considered the front \end{DoxyCompactList}\item 
\hypertarget{MyroC_8h_a9e21fdea3dffc9e336739c8e7d455b59}{void \hyperlink{MyroC_8h_a9e21fdea3dffc9e336739c8e7d455b59}{r\-Set\-Forwardness\-Txt} (char $\ast$direction)}\label{MyroC_8h_a9e21fdea3dffc9e336739c8e7d455b59}

\begin{DoxyCompactList}\small\item\em alternative to r\-Set\-Forwardness for compatibility with earlier Myro\-C \end{DoxyCompactList}\item 
char $\ast$ \hyperlink{MyroC_8h_a07e585491ba7af9e13779f9e3db6fd31}{r\-Get\-Forwardness} ()
\begin{DoxyCompactList}\small\item\em Gets the forwardness of the Scribbler. \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_a21581ded1f409300e8f63f4c41c2f2f0}{r\-Set\-L\-E\-D\-Front} (int led)
\begin{DoxyCompactList}\small\item\em Set the front \mbox{[}fluke\mbox{]} L\-E\-D on or off. \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_a2466176fa2332b88e5013d6b3fe9ceb8}{r\-Set\-L\-E\-D\-Back} (double led)
\begin{DoxyCompactList}\small\item\em Set the the intensity of the back fluke L\-E\-D,. \end{DoxyCompactList}\item 
double \hyperlink{MyroC_8h_a80896cdb3ff63acd1fa0a5ce97ba7c9d}{r\-Get\-Battery} ()
\begin{DoxyCompactList}\small\item\em Get the percentage of volts left in the batteries of the scribbler. \end{DoxyCompactList}\item 
int \hyperlink{MyroC_8h_a9296f6acbac4ef59cfc6cb0dc535c60f}{r\-Get\-Stall} (int sample\-Size)
\begin{DoxyCompactList}\small\item\em Determine if robot has stalled Since readings of each brightness sensor can vary substantially, each sensor can be queried sample\-Size times and an average obtained. \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_ac7c83fef113af1c3612ce59c03417e8b}{r\-Set\-Bluetooth\-Echo} (char on\-Off)
\begin{DoxyCompactList}\small\item\em Turn on and off echoing of Bluetooth transmissions All robot commands involve the transmission of a command over Bluetooth Scribbler commands are always 9 bytes Fluke commands have varying lengths The fluke echos most, but not all, of the commands For many commands, the fluke also echos 11 bytes of sensor data. \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_a9006ba8c581c7543d7d460d76c06d077}{r\-Get\-Lights\-All} (int light\-Sensors\mbox{[}3\mbox{]}, int sample\-Size)
\begin{DoxyCompactList}\small\item\em Get the average values of each of the three light sensors in an array. Values of each light sensor can somewhat (typically under 5\%-\/10\%). To even out variability, the sensor can be queried sample\-Size times and an average obtained. \end{DoxyCompactList}\item 
int \hyperlink{MyroC_8h_aaba34be55fd5db7d8c1ed08ea7caa6c2}{r\-Get\-Light\-Txt} (const char $\ast$sensor\-Name, int sample\-Size)
\begin{DoxyCompactList}\small\item\em Get the average values of a specified light sensor. Values of each light sensor can somewhat (typically under 5\%-\/10\%). To even out variability, the sensor can be queried sample\-Size times and an average obtained. \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_ab4bf6868424a63a95a85decea8a93fc2}{r\-Get\-I\-R\-All} (int ir\-Sensors\mbox{[}2\mbox{]}, int sample\-Size)
\begin{DoxyCompactList}\small\item\em Get an array of true/false values regarding the presence of obstacle based on the average values of each of the three I\-R sensors. Since readings of each light sensor can vary substantially, each sensor can be queried sample\-Size times and an average obtained. \end{DoxyCompactList}\item 
int \hyperlink{MyroC_8h_afdf7579ce632c07de1d90f27d67abff7}{r\-Get\-I\-R\-Txt} (const char $\ast$sensor\-Name, int sample\-Size)
\begin{DoxyCompactList}\small\item\em Use specified I\-R sensor to determine if obstacle is present. Since values of each light sensor can vary substantially, the sensor can be queried sample\-Size times and an average obtained. \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_a7fc13d53088ba239a95c99b46b9607e8}{r\-Get\-Line} (int line\-Sensors\mbox{[}2\mbox{]}, int sample\-Size)
\begin{DoxyCompactList}\small\item\em Use Scribbler 2 line sensors of Scribbler to check for a black line on a white surface under the robot. Since values of each light sensor can vary substantially, the sensor can be queried sample\-Size times and an average obtained. \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_ab319898f4ab7d48f15e1215db8e5b4ba}{r\-Set\-I\-R\-Power} (int power)
\begin{DoxyCompactList}\small\item\em Set the amount of power for the dongle's I\-R sensors. \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_a3a47f1f85c9fa6d68b5ebd8c0ad2e484}{r\-Get\-Obstacle\-All} (int obst\-Sensors\mbox{[}3\mbox{]}, int sample\-Size)
\begin{DoxyCompactList}\small\item\em Get the average values of the three obstacle sensors in an array. Since readings of each obstacle sensor can vary substantially (successive readings may differ by several hundred or more), each sensor can be queried sample\-Size times and an average obtained. \end{DoxyCompactList}\item 
int \hyperlink{MyroC_8h_a5853bf9f106b47ed0e767adf8fab0d0b}{r\-Get\-Obstacle\-Txt} (const char $\ast$sensor\-Name, int sample\-Size)
\begin{DoxyCompactList}\small\item\em Get the average values of a specified obstacle (I\-R) sensor. Since values of each obstacle sensor can vary substantially (successive readings may differ by several hundred or more), the sensor can be queried sample\-Size times and an average obtained. \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_a98820d670fcacb6780e68a58a4bc0a8a}{r\-Get\-Bright\-All} (int bright\-Sensors\mbox{[}3\mbox{]}, int sample\-Size)
\begin{DoxyCompactList}\small\item\em Read the Fluke's virtual light sensors. Since readings of each brightness sensor can vary substantially (successive readings may differ by 5000-\/10000), each sensor can be queried sample\-Size times and an average obtained. \end{DoxyCompactList}\item 
int \hyperlink{MyroC_8h_a6c898c1c12957822fbd0e2b68f573c4d}{r\-Get\-Bright\-Txt} (char $\ast$sensor\-Name, int sample\-Size)
\begin{DoxyCompactList}\small\item\em Reads one of the Fluke's virtual light sensors. Since values of each obstacle sensor can vary substantially (successive readings may differ by 5000-\/10000), the sensor can be queried sample\-Size times and an average obtained. \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_a1e10a9735a4b8dc8c79100905c30ecab}{r\-Get\-Info} (char $\ast$info\-Buffer)
\begin{DoxyCompactList}\small\item\em returns information about the robot's dongle, firmware, and communication mode as a 60 character array in info\-Buffer. \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_a1b2462eb7a3149a89cfe73f39339ed89}{r\-Turn\-Left} (double speed, double time)
\begin{DoxyCompactList}\small\item\em turn Scribbler left for a specified time and speed \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_a0c3496dd17992e9788110c15c017e566}{r\-Turn\-Right} (double speed, double time)
\begin{DoxyCompactList}\small\item\em turn Scribbler right for a specified time and speed \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_aa1a97cc92ee785afb8af4e248d08cbb9}{r\-Turn\-Speed} (char $\ast$direction, double speed, double time)
\begin{DoxyCompactList}\small\item\em turn Scribbler in direction for a specified time and speed \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_aaf2b57e29c053c7e3901ec5ee3cb047d}{r\-Forward} (double speed, double time)
\begin{DoxyCompactList}\small\item\em moves Scribbler forward for a specified time and speed \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_af55f107794f40ee2f77dd6817ad1453f}{r\-Fast\-Forward} (double time)
\begin{DoxyCompactList}\small\item\em moves Scribbler forward at the largest possible speed for a specified time \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_aa5544de8b24ee7917bcb1ba695071459}{r\-Backward} (double speed, double time)
\begin{DoxyCompactList}\small\item\em moves Scribbler backward for a specified time and speed \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_a6712dd6e8442e19ff28158adeaf7c0d0}{r\-Motors} (double left\-Speed, double right\-Speed)
\begin{DoxyCompactList}\small\item\em move robot with given speeds for the left and right motors continues until given another motion command or disconnected (non-\/blocking) \end{DoxyCompactList}\item 
\hypertarget{MyroC_8h_ac561c993b092a153091bb20d2e4aca45}{void \hyperlink{MyroC_8h_ac561c993b092a153091bb20d2e4aca45}{r\-Stop} ()}\label{MyroC_8h_ac561c993b092a153091bb20d2e4aca45}

\begin{DoxyCompactList}\small\item\em directs robot to stop movement \end{DoxyCompactList}\item 
\hypertarget{MyroC_8h_ae0c1a7d7ba14f6efb8df0db1f4bc08b9}{void \hyperlink{MyroC_8h_ae0c1a7d7ba14f6efb8df0db1f4bc08b9}{r\-Hard\-Stop} ()}\label{MyroC_8h_ae0c1a7d7ba14f6efb8df0db1f4bc08b9}

\begin{DoxyCompactList}\small\item\em cuts power to the motor of the robot \end{DoxyCompactList}\item 
\hyperlink{structPicture}{Picture} \hyperlink{MyroC_8h_a4e10733a73b58955046a5cf2252117a0}{r\-Take\-Picture} ()
\begin{DoxyCompactList}\small\item\em Use the camera to take a photo. \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_aae5f14b4e6e28456e3a563b027052c02}{r\-Save\-Picture} (\hyperlink{structPicture}{Picture} pic, char $\ast$filename)
\begin{DoxyCompactList}\small\item\em Save a \hyperlink{structPicture}{Picture} to a .jpeg. \end{DoxyCompactList}\item 
\hyperlink{structPicture}{Picture} \hyperlink{MyroC_8h_a22bed206f3ae7563a116be255e91906e}{r\-Load\-Picture} (char $\ast$filename)
\begin{DoxyCompactList}\small\item\em Load a picture from a .jpeg file. \end{DoxyCompactList}\item 
void \hyperlink{MyroC_8h_aef27262c15e206579736b5fca76b00c9}{r\-Display\-Picture} (\hyperlink{structPicture}{Picture} pic, double duration, const char $\ast$window\-Title)
\begin{DoxyCompactList}\small\item\em Display a picture in a new window. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Header for a C-\/based, my-\/robot package for the Scribbler 2. \begin{DoxyAuthor}{Authors}
Spencer Liberto 

Dilan Ustek 

Jordan Yuan 

Vasilisa Bashlovkina 

Anita De\-Witt 

Jason Liu 

Nick Knoebber 

Henry M. Walker
\end{DoxyAuthor}
Based on a C++ package by April O'Neill, David Cowden, Dilan Ustek, Erik Opavsky, and Henry M. Walker

\begin{DoxyNote}{Note}
There is an r in the beginning of every function to make it easier to understand whether it is a robot function. 
\end{DoxyNote}


\subsection{Function Documentation}
\hypertarget{MyroC_8h_aa5544de8b24ee7917bcb1ba695071459}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Backward@{r\-Backward}}
\index{r\-Backward@{r\-Backward}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Backward}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Backward (
\begin{DoxyParamCaption}
\item[{double}]{speed, }
\item[{double}]{time}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_aa5544de8b24ee7917bcb1ba695071459}


moves Scribbler backward for a specified time and speed 


\begin{DoxyParams}{Parameters}
{\em speed} & the rate at which the robot should move backward linear range\-: -\/1.\-0 specifies move forward at full speed 0.\-0 specifies no forward/backward movement 1.\-0 specifies move backward at full speed \\
\hline
{\em time} & specifies the duration of the turn if negative\-: robot continues to go backward until given another motion command or disconnected (non-\/blocking) if nonnegative\-: robot moves backward for the given duration, in seconds\\
\hline
\end{DoxyParams}
moves Scribbler backward for a specified time and speed 
\begin{DoxyParams}{Parameters}
{\em speed} & the rate at which the robot should move backward linear range\-: -\/1.\-0 specifies move forward at full speed 0.\-0 specifies no forward/backward movement 1.\-0 specifies move backward at full speed \\
\hline
{\em time} & specifies the duration of the turn if negative\-: robot continues to go backward until given another motion command or disconnected (non-\/blocking) if nonnegative\-: robot moves backward for the given duration, in seconds \\
\hline
\end{DoxyParams}
\hypertarget{MyroC_8h_aa46e349ecd38fc90f8d7cea9bb8678d6}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Beep@{r\-Beep}}
\index{r\-Beep@{r\-Beep}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Beep}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Beep (
\begin{DoxyParamCaption}
\item[{double}]{duration, }
\item[{int}]{frequency}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_aa46e349ecd38fc90f8d7cea9bb8678d6}


Beeps with the given duration and frequency. 


\begin{DoxyParams}{Parameters}
{\em duration} & length of note in seconds \\
\hline
{\em frequency} & frequency of pitch in cycles per second (hertz) \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
duration $>$ 0.\-0
\end{DoxyPrecond}
Beeps with the given duration and frequency 
\begin{DoxyParams}{Parameters}
{\em duration} & length of note in seconds \\
\hline
{\em frequency} & frequency of pitch in cycles per second (hertz) \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
duration $>$ 0.\-0 
\end{DoxyPrecond}
\hypertarget{MyroC_8h_a37ccc278b3ecca6290debf1929d1e479}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Beep2@{r\-Beep2}}
\index{r\-Beep2@{r\-Beep2}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Beep2}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Beep2 (
\begin{DoxyParamCaption}
\item[{double}]{duration, }
\item[{int}]{freq1, }
\item[{int}]{freq2}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a37ccc278b3ecca6290debf1929d1e479}


Generates two notes for the prescribed duration. 


\begin{DoxyParams}{Parameters}
{\em duration} & length of note in seconds \\
\hline
{\em freq1} & frequency of first pitch in cycles per second (hertz) \\
\hline
{\em freq2} & frequency of second pitch in cycles per second (hertz) \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
duration $>$ 0.\-0
\end{DoxyPrecond}
Generates two notes for the prescribed duration 
\begin{DoxyParams}{Parameters}
{\em duration} & length of note in seconds \\
\hline
{\em freq1} & frequency of first pitch in cycles per second (hertz) \\
\hline
{\em freq2} & frequency of second pitch in cycles per second (hertz) \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
duration $>$ 0.\-0 
\end{DoxyPrecond}
\hypertarget{MyroC_8h_aadfc48e2707da0e4f1f01e6aa14b6ef4}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Connect@{r\-Connect}}
\index{r\-Connect@{r\-Connect}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Connect}]{\setlength{\rightskip}{0pt plus 5cm}int r\-Connect (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{address}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_aadfc48e2707da0e4f1f01e6aa14b6ef4}


connects program to Scribbler 


\begin{DoxyParams}{Parameters}
{\em address} & string, giving name of workstation port or a Scribbler Bluetooth designation\\
\hline
\end{DoxyParams}
several string formats are possible a communications port, such as \char`\"{}/dev/rfcomm0\char`\"{} a M\-A\-C address, such as \char`\"{}00\-:1\-E\-:19\-:01\-:0\-E\-:13\char`\"{} a Scribbler 2 fluke serial number, such as \char`\"{}245787\char`\"{} a full I\-P\-R\-E serial number, such as \char`\"{}\-I\-P\-R\-E245787\char`\"{} a Fluke 2 serial number (hexadecimal), such as \char`\"{}021\-F\char`\"{} a full Fluke 2 serial number, such as \char`\"{}\-Fluke2-\/021\-F\char`\"{}

\begin{DoxyReturn}{Returns}
the socket number of communications port
\end{DoxyReturn}
\begin{DoxyPostcond}{Postcondition}
subsequent communications will take place through this socket, unless changed by r\-Set\-Connection
\end{DoxyPostcond}
connects program to Scribbler 
\begin{DoxyParams}{Parameters}
{\em address} & string, giving name of workstation port or a Scribbler Bluetooth designation\\
\hline
\end{DoxyParams}
several string formats are possible a communications port, such as \char`\"{}/dev/rfcomm0\char`\"{} a M\-A\-C address, such as \char`\"{}00\-:1\-E\-:19\-:01\-:0\-E\-:13\char`\"{} a Scribbler 2 fluke serial number, such as \char`\"{}245787\char`\"{} a full I\-P\-R\-E serial number, such as \char`\"{}\-I\-P\-R\-E245787\char`\"{} a Fluke 2 serial number (hexadecimal), such as \char`\"{}021\-F\char`\"{} a full Fluke 2 serial number, such as \char`\"{}\-Fluke2-\/021\-F\char`\"{}

\begin{DoxyReturn}{Returns}
the socket number of communications port
\end{DoxyReturn}
\begin{DoxyPostcond}{Postcondition}
subsequent communications will take place through this socket, unless changed by r\-Set\-Connection 
\end{DoxyPostcond}
\hypertarget{MyroC_8h_aef27262c15e206579736b5fca76b00c9}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Display\-Picture@{r\-Display\-Picture}}
\index{r\-Display\-Picture@{r\-Display\-Picture}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Display\-Picture}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Display\-Picture (
\begin{DoxyParamCaption}
\item[{{\bf Picture}}]{pic, }
\item[{double}]{duration, }
\item[{const char $\ast$}]{window\-Title}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_aef27262c15e206579736b5fca76b00c9}


Display a picture in a new window. 


\begin{DoxyParams}{Parameters}
{\em pic} & R\-G\-B picture struct from Scribbler 2 camera \\
\hline
{\em duration} & if duration $>$ 0, operation is blocking if duration $<$= 0, operation is non-\/blocking for duration != 0, picture displayed for abs(duration) seconds or until picture closed manually if duration == 0, picture displayed until closed manually \\
\hline
{\em window\-Title} & The title of the window that appears. white spaces will be replaced with underscores. \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
window\-Title is less than 100 characters.
\end{DoxyPrecond}
Display a picture in a new window 
\begin{DoxyParams}{Parameters}
{\em pic} & R\-G\-B picture struct from Scribbler 2 camera \\
\hline
{\em duration} & if duration $>$ 0, operation is blocking if duration $<$= 0, operation is non-\/blocking for duration != 0, picture displayed for abs(duration) seconds or until picture closed manually if duration == 0, picture displayed until closed manually \\
\hline
{\em window\-Title} & The title of the window that appears. white spaces will be replaced with underscores. \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
window\-Title is less than 100 characters. 
\end{DoxyPrecond}
\hypertarget{MyroC_8h_af55f107794f40ee2f77dd6817ad1453f}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Fast\-Forward@{r\-Fast\-Forward}}
\index{r\-Fast\-Forward@{r\-Fast\-Forward}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Fast\-Forward}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Fast\-Forward (
\begin{DoxyParamCaption}
\item[{double}]{time}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_af55f107794f40ee2f77dd6817ad1453f}


moves Scribbler forward at the largest possible speed for a specified time 


\begin{DoxyParams}{Parameters}
{\em time} & specifies the duration of movement if negative\-: robot continues to move forward until given another motion command or disconnected (non-\/blocking) if nonnegative\-: robot moves forward for the given duration, in seconds \\
\hline
\end{DoxyParams}
\begin{DoxyWarning}{Warning}
may take longer than usual to execute
\end{DoxyWarning}
moves Scribbler forward at the largest possible speed for a specified time 
\begin{DoxyParams}{Parameters}
{\em time} & specifies the duration of movement if negative\-: robot continues to move forward until given another motion command or disconnected (non-\/blocking) if nonnegative\-: robot moves forward for the given duration, in seconds \\
\hline
\end{DoxyParams}
\begin{DoxyWarning}{Warning}
may take longer than usual to execute 
\end{DoxyWarning}
\hypertarget{MyroC_8h_aaf2b57e29c053c7e3901ec5ee3cb047d}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Forward@{r\-Forward}}
\index{r\-Forward@{r\-Forward}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Forward}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Forward (
\begin{DoxyParamCaption}
\item[{double}]{speed, }
\item[{double}]{time}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_aaf2b57e29c053c7e3901ec5ee3cb047d}


moves Scribbler forward for a specified time and speed 


\begin{DoxyParams}{Parameters}
{\em speed} & the rate at which the robot should move forward linear range\-: -\/1.\-0 specifies move backward at full speed 0.\-0 specifies no forward/backward movement 1.\-0 specifies move forward at full speed \\
\hline
{\em time} & specifies the duration of movement if negative\-: robot continues to move forward until given another motion command or disconnected (non-\/blocking) if nonnegative\-: robot moves forward for the given duration, in seconds\\
\hline
\end{DoxyParams}
moves Scribbler forward for a specified time and speed 
\begin{DoxyParams}{Parameters}
{\em speed} & the rate at which the robot should move forward linear range\-: -\/1.\-0 specifies move backward at full speed 0.\-0 specifies no forward/backward movement 1.\-0 specifies move forward at full speed \\
\hline
{\em time} & specifies the duration of movement if negative\-: robot continues to move forward until given another motion command or disconnected (non-\/blocking) if nonnegative\-: robot moves forward for the given duration, in seconds \\
\hline
\end{DoxyParams}
\hypertarget{MyroC_8h_a80896cdb3ff63acd1fa0a5ce97ba7c9d}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Get\-Battery@{r\-Get\-Battery}}
\index{r\-Get\-Battery@{r\-Get\-Battery}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Get\-Battery}]{\setlength{\rightskip}{0pt plus 5cm}double r\-Get\-Battery (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a80896cdb3ff63acd1fa0a5ce97ba7c9d}


Get the percentage of volts left in the batteries of the scribbler. 

\begin{DoxyReturn}{Returns}
percentage of battery voltage
\end{DoxyReturn}
Get the percentage of volts left in the batteries of the scribbler \begin{DoxyWarning}{Warning}
may not return useful values 
\end{DoxyWarning}
\begin{DoxyReturn}{Returns}
percentage of battery voltage 
\end{DoxyReturn}
\hypertarget{MyroC_8h_a98820d670fcacb6780e68a58a4bc0a8a}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Get\-Bright\-All@{r\-Get\-Bright\-All}}
\index{r\-Get\-Bright\-All@{r\-Get\-Bright\-All}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Get\-Bright\-All}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Get\-Bright\-All (
\begin{DoxyParamCaption}
\item[{int}]{bright\-Sensors\mbox{[}3\mbox{]}, }
\item[{int}]{sample\-Size}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a98820d670fcacb6780e68a58a4bc0a8a}


Read the Fluke's virtual light sensors. Since readings of each brightness sensor can vary substantially (successive readings may differ by 5000-\/10000), each sensor can be queried sample\-Size times and an average obtained. 


\begin{DoxyParams}{Parameters}
{\em bright\-Sensors} & array to store intensity values \\
\hline
{\em sample\-Size} & how many readings are taken for each sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
space already allocated for bright\-Sensors array sample\-Size $>$ 0 
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
bright\-Sensors\mbox{[}0\mbox{]} gives average value for left sensor bright\-Sensors\mbox{[}1\mbox{]} gives average value for middle sensor bright\-Sensors\mbox{[}2\mbox{]} gives average value for right sensor Brightness values near 0 represent bright light Brightness values may extend to about 65535 for a very dark region.
\end{DoxyPostcond}
Read the Fluke's virtual light sensors. Since readings of each brightness sensor can vary substantially (successive readings may differ by 5000-\/10000), each sensor can be queried sample\-Size times and an average obtained. 
\begin{DoxyParams}{Parameters}
{\em bright\-Sensors} & array to store intensity values \\
\hline
{\em sample\-Size} & how many readings are taken for each sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
space already allocated for bright\-Sensors array sample\-Size $>$ 0 
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
bright\-Sensors\mbox{[}0\mbox{]} gives average value for left sensor bright\-Sensors\mbox{[}1\mbox{]} gives average value for middle sensor bright\-Sensors\mbox{[}2\mbox{]} gives average value for right sensor Brightness values near 0 represent bright light Brightness values may extend to about 65535 for a very dark region. 
\end{DoxyPostcond}
\hypertarget{MyroC_8h_a6c898c1c12957822fbd0e2b68f573c4d}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Get\-Bright\-Txt@{r\-Get\-Bright\-Txt}}
\index{r\-Get\-Bright\-Txt@{r\-Get\-Bright\-Txt}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Get\-Bright\-Txt}]{\setlength{\rightskip}{0pt plus 5cm}int r\-Get\-Bright\-Txt (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{sensor\-Name, }
\item[{int}]{sample\-Size}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a6c898c1c12957822fbd0e2b68f573c4d}


Reads one of the Fluke's virtual light sensors. Since values of each obstacle sensor can vary substantially (successive readings may differ by 5000-\/10000), the sensor can be queried sample\-Size times and an average obtained. 


\begin{DoxyParams}{Parameters}
{\em sensor\-Name} & name of the obstacle sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
sensor\-Name is \char`\"{}left\char`\"{}, \char`\"{}center\char`\"{}, \char`\"{}middle\char`\"{}, or \char`\"{}right\char`\"{} (not case sensitive) designations \char`\"{}center\char`\"{} and \char`\"{}middle\char`\"{} are alternatives for the same light sensor 
\end{DoxyPrecond}

\begin{DoxyParams}{Parameters}
{\em sample\-Size} & how many readings are taken for the sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
sample\-Size $>$ 0 
\end{DoxyPrecond}
\begin{DoxyReturn}{Returns}
reading from the specified obstacle sensor, averaged over sample\-Size number of data samples Brightness values near 0 represent bright light Brightness values may extend to about 65535 for a very dark region.
\end{DoxyReturn}
Reads one of the Fluke's virtual light sensors. Since values of each obstacle sensor can vary substantially (successive readings may differ by 5000-\/10000), the sensor can be queried sample\-Size times and an average obtained. 
\begin{DoxyParams}{Parameters}
{\em sensor\-Name} & name of the obstacle sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
sensor\-Name is \char`\"{}left\char`\"{}, \char`\"{}center\char`\"{}, \char`\"{}middle\char`\"{}, or \char`\"{}right\char`\"{} (not case sensitive) designations \char`\"{}center\char`\"{} and \char`\"{}middle\char`\"{} are alternatives for the same light sensor 
\end{DoxyPrecond}

\begin{DoxyParams}{Parameters}
{\em sample\-Size} & how many readings are taken for the sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
sample\-Size $>$ 0 
\end{DoxyPrecond}
\begin{DoxyReturn}{Returns}
reading from the specified obstacle sensor, averaged over sample\-Size number of data samples Brightness values near 0 represent bright light Brightness values may extend to about 65535 for a very dark region. 
\end{DoxyReturn}
\hypertarget{MyroC_8h_a07e585491ba7af9e13779f9e3db6fd31}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Get\-Forwardness@{r\-Get\-Forwardness}}
\index{r\-Get\-Forwardness@{r\-Get\-Forwardness}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Get\-Forwardness}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ r\-Get\-Forwardness (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a07e585491ba7af9e13779f9e3db6fd31}


Gets the forwardness of the Scribbler. 

\begin{DoxyReturn}{Returns}
either \char`\"{}fluke-\/forward\char`\"{} or \char`\"{}scribbler-\/forward\char`\"{}
\end{DoxyReturn}
Gets the forwardness of the Scribbler \begin{DoxyReturn}{Returns}
either \char`\"{}fluke-\/forward\char`\"{} or \char`\"{}scribbler-\/forward\char`\"{} 
\end{DoxyReturn}
\hypertarget{MyroC_8h_a1e10a9735a4b8dc8c79100905c30ecab}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Get\-Info@{r\-Get\-Info}}
\index{r\-Get\-Info@{r\-Get\-Info}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Get\-Info}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Get\-Info (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{info\-Buffer}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a1e10a9735a4b8dc8c79100905c30ecab}


returns information about the robot's dongle, firmware, and communication mode as a 60 character array in info\-Buffer. 


\begin{DoxyParams}{Parameters}
{\em info\-Buffer} & a pre-\/defined, 60-\/character array \\
\hline
\end{DoxyParams}
\begin{DoxyPostcond}{Postcondition}
info\-Buffer contains relevant robot information
\end{DoxyPostcond}
returns information about the robot's dongle, firmware, and communication mode as a 60 character array in info\-Buffer. 
\begin{DoxyParams}{Parameters}
{\em info\-Buffer} & a pre-\/defined, 60-\/character array \\
\hline
\end{DoxyParams}
\begin{DoxyPostcond}{Postcondition}
info\-Buffer contains relevant robot information 
\end{DoxyPostcond}
\hypertarget{MyroC_8h_ab4bf6868424a63a95a85decea8a93fc2}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Get\-I\-R\-All@{r\-Get\-I\-R\-All}}
\index{r\-Get\-I\-R\-All@{r\-Get\-I\-R\-All}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Get\-I\-R\-All}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Get\-I\-R\-All (
\begin{DoxyParamCaption}
\item[{int}]{ir\-Sensors\mbox{[}2\mbox{]}, }
\item[{int}]{sample\-Size}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_ab4bf6868424a63a95a85decea8a93fc2}


Get an array of true/false values regarding the presence of obstacle based on the average values of each of the three I\-R sensors. Since readings of each light sensor can vary substantially, each sensor can be queried sample\-Size times and an average obtained. 


\begin{DoxyParams}{Parameters}
{\em ir\-Sensors} & array to store intensity values \\
\hline
{\em sample\-Size} & how many readings are taken for each sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
space already allocated for ir\-Sensors array sample\-Size $>$ 0 
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
ir\-Sensors\mbox{[}0\mbox{]} checks obstacle for left sensor ir\-Sensors\mbox{[}1\mbox{]} checks obstacle for right sensor 

for each ir\-Sensors array value return 0 indicates no obstacle detected return 1 indicates obstacle detected
\end{DoxyPostcond}
Get an array of true/false values regarding the presence of an obstacle, based on the average values of each of the three I\-R sensors. Since readings of each light sensor can vary substantially, each sensor can be queried sample\-Size times and an average obtained. 
\begin{DoxyParams}{Parameters}
{\em ir\-Sensors} & array to store intensity values \\
\hline
{\em sample\-Size} & how many readings are taken for each sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
space already allocated for ir\-Sensors array sample\-Size $>$ 0 
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
ir\-Sensors\mbox{[}0\mbox{]} checks obstacle for left sensor ir\-Sensors\mbox{[}1\mbox{]} checks obstacle for right sensor 

for each ir\-Sensors array value return 0 indicates no obstacle detected return 1 indicates obstacle detected 
\end{DoxyPostcond}
\hypertarget{MyroC_8h_afdf7579ce632c07de1d90f27d67abff7}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Get\-I\-R\-Txt@{r\-Get\-I\-R\-Txt}}
\index{r\-Get\-I\-R\-Txt@{r\-Get\-I\-R\-Txt}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Get\-I\-R\-Txt}]{\setlength{\rightskip}{0pt plus 5cm}int r\-Get\-I\-R\-Txt (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{sensor\-Name, }
\item[{int}]{sample\-Size}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_afdf7579ce632c07de1d90f27d67abff7}


Use specified I\-R sensor to determine if obstacle is present. Since values of each light sensor can vary substantially, the sensor can be queried sample\-Size times and an average obtained. 


\begin{DoxyParams}{Parameters}
{\em sensor\-Name} & name of the light sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
sensor\-Name is \char`\"{}left\char`\"{} or \char`\"{}right\char`\"{} (not case sensitive) 
\end{DoxyPrecond}

\begin{DoxyParams}{Parameters}
{\em sample\-Size} & how many readings are taken for the sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
sample\-Size $>$ 0 
\end{DoxyPrecond}
\begin{DoxyReturn}{Returns}
true/false (0/1) determination of obstacle, based on I\-R sensor\-Name sensor, averaged over sample\-Size number of data samples 
\end{DoxyReturn}
\begin{DoxyPostcond}{Postcondition}
return 0 indicates no obstacle detected return 1 indicates obstacle detected
\end{DoxyPostcond}
Use specified I\-R sensor to determine if obstacle is present. Since values of each light sensor can vary substantially, the sensor can be queried sample\-Size times and an average obtained. 
\begin{DoxyParams}{Parameters}
{\em sensor\-Name} & name of the light sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
sensor\-Name is \char`\"{}left\char`\"{} or \char`\"{}right\char`\"{} (not case sensitive) 
\end{DoxyPrecond}

\begin{DoxyParams}{Parameters}
{\em sample\-Size} & how many readings are taken for the sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
sample\-Size $>$ 0 
\end{DoxyPrecond}
\begin{DoxyReturn}{Returns}
true/false (0/1) determination of obstacle, based on I\-R sensor\-Name sensor, averaged over sample\-Size number of data samples 
\end{DoxyReturn}
\begin{DoxyPostcond}{Postcondition}
return 0 indicates no obstacle detected return 1 indicates obstacle detected 
\end{DoxyPostcond}
\hypertarget{MyroC_8h_a9006ba8c581c7543d7d460d76c06d077}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Get\-Lights\-All@{r\-Get\-Lights\-All}}
\index{r\-Get\-Lights\-All@{r\-Get\-Lights\-All}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Get\-Lights\-All}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Get\-Lights\-All (
\begin{DoxyParamCaption}
\item[{int}]{light\-Sensors\mbox{[}3\mbox{]}, }
\item[{int}]{sample\-Size}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a9006ba8c581c7543d7d460d76c06d077}


Get the average values of each of the three light sensors in an array. Values of each light sensor can somewhat (typically under 5\%-\/10\%). To even out variability, the sensor can be queried sample\-Size times and an average obtained. 


\begin{DoxyParams}{Parameters}
{\em light\-Sensors} & array to store intensity values \\
\hline
{\em sample\-Size} & how many readings are taken for each sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
space already allocated for light\-Sensors array sample\-Size $>$ 0 
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
light\-Sensors\mbox{[}0\mbox{]} gives average value for left sensor light\-Sensors\mbox{[}1\mbox{]} gives average value for middle sensor light\-Sensors\mbox{[}2\mbox{]} gives average value for right sensor Intensity values near 0 represent bright light Intensities may extend to about 65000 for a very dark region.
\end{DoxyPostcond}
Get the average values of each of the three light sensors in an array. Values of each light sensor can somewhat (typically under 5\%-\/10\%). To even out variability, the sensor can be queried sample\-Size times and an average obtained. 
\begin{DoxyParams}{Parameters}
{\em light\-Sensors} & array to store intensity values \\
\hline
{\em sample\-Size} & how many readings are taken for each sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
space already allocated for light\-Sensors array sample\-Size $>$ 0 
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
light\-Sensors\mbox{[}0\mbox{]} gives average value for left sensor light\-Sensors\mbox{[}1\mbox{]} gives average value for middle sensor light\-Sensors\mbox{[}2\mbox{]} gives average value for right sensor Intensity values near 0 represent bright light Intensities may extend to about 65000 for a very dark region. 
\end{DoxyPostcond}
\hypertarget{MyroC_8h_aaba34be55fd5db7d8c1ed08ea7caa6c2}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Get\-Light\-Txt@{r\-Get\-Light\-Txt}}
\index{r\-Get\-Light\-Txt@{r\-Get\-Light\-Txt}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Get\-Light\-Txt}]{\setlength{\rightskip}{0pt plus 5cm}int r\-Get\-Light\-Txt (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{sensor\-Name, }
\item[{int}]{sample\-Size}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_aaba34be55fd5db7d8c1ed08ea7caa6c2}


Get the average values of a specified light sensor. Values of each light sensor can somewhat (typically under 5\%-\/10\%). To even out variability, the sensor can be queried sample\-Size times and an average obtained. 


\begin{DoxyParams}{Parameters}
{\em sensor\-Name} & name of the light sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
sensor\-Name is \char`\"{}left\char`\"{}, \char`\"{}center\char`\"{}, \char`\"{}middle\char`\"{}, or \char`\"{}right\char`\"{} (not case sensitive) designations \char`\"{}center\char`\"{} and \char`\"{}middle\char`\"{} are alternatives for the same light sensor 
\end{DoxyPrecond}

\begin{DoxyParams}{Parameters}
{\em sample\-Size} & how many readings are taken for the sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
sample\-Size $>$ 0 
\end{DoxyPrecond}
\begin{DoxyReturn}{Returns}
reading from the specified light sensor, averaged over sample\-Size number of data samples if sensor\-Name invalid, returns -\/1.\-0
\end{DoxyReturn}
Get the average values of a specified light sensor. Values of each light sensor can vary somewhat (typically under 5\%-\/10\%). To even out variability, the sensor can be queried sample\-Size times and an average obtained. 
\begin{DoxyParams}{Parameters}
{\em sensor\-Name} & name of the light sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
sensor\-Name is \char`\"{}left\char`\"{}, \char`\"{}center\char`\"{}, \char`\"{}middle\char`\"{}, or \char`\"{}right\char`\"{} (not case sensitive) designations \char`\"{}center\char`\"{} and \char`\"{}middle\char`\"{} are alternatives for the same light sensor 
\end{DoxyPrecond}

\begin{DoxyParams}{Parameters}
{\em sample\-Size} & how many readings are taken for the sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
sample\-Size $>$ 0 
\end{DoxyPrecond}
\begin{DoxyReturn}{Returns}
reading from the specified light sensor, averaged over sample\-Size number of data samples if sensor\-Name invalid, returns -\/1.\-0 
\end{DoxyReturn}
\hypertarget{MyroC_8h_a7fc13d53088ba239a95c99b46b9607e8}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Get\-Line@{r\-Get\-Line}}
\index{r\-Get\-Line@{r\-Get\-Line}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Get\-Line}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Get\-Line (
\begin{DoxyParamCaption}
\item[{int}]{line\-Sensors\mbox{[}2\mbox{]}, }
\item[{int}]{sample\-Size}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a7fc13d53088ba239a95c99b46b9607e8}


Use Scribbler 2 line sensors of Scribbler to check for a black line on a white surface under the robot. Since values of each light sensor can vary substantially, the sensor can be queried sample\-Size times and an average obtained. 

\begin{DoxyWarning}{Warning}
results of these sensors may be flakey! 
\end{DoxyWarning}

\begin{DoxyParams}{Parameters}
{\em line\-Sensors} & array to store line values detected \\
\hline
{\em sample\-Size} & how many readings are taken for each sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
space already allocated for line\-Sensors array sample\-Size $>$ 0 
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
line\-Sensors\mbox{[}0\mbox{]} checks left sensor for line line\-Sensors\mbox{[}1\mbox{]} checks right sensor for line 

for each ir\-Sensors array value return 0 indicates line is identified return 1 indicates line is not identified
\end{DoxyPostcond}
Use Scribbler 2 line sensors of Scribbler to check for a black line on a white surface under the robot. Since values of each light sensor can vary substantially, the sensor can be queried sample\-Size times and an average obtained. \begin{DoxyWarning}{Warning}
results of these sensors may be flakey! 
\end{DoxyWarning}

\begin{DoxyParams}{Parameters}
{\em line\-Sensors} & array to store line values detected \\
\hline
{\em sample\-Size} & how many readings are taken for each sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
space already allocated for line\-Sensors array sample\-Size $>$ 0 
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
line\-Sensors\mbox{[}0\mbox{]} checks left sensor for line line\-Sensors\mbox{[}1\mbox{]} checks right sensor for line 

for each ir\-Sensors array value return 0 indicates line is identified return 1 indicates line is not identified 
\end{DoxyPostcond}
\hypertarget{MyroC_8h_a881bb425d86ebb8caacd6be66c2f8a37}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Get\-Name@{r\-Get\-Name}}
\index{r\-Get\-Name@{r\-Get\-Name}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Get\-Name}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ r\-Get\-Name (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a881bb425d86ebb8caacd6be66c2f8a37}


Get the name of the robot. 

\begin{DoxyReturn}{Returns}
information about the name of the robot 
\end{DoxyReturn}
\begin{DoxyPostcond}{Postcondition}
the returned name is a newly-\/allocated 17-\/byte string 
\end{DoxyPostcond}
\hypertarget{MyroC_8h_a3a47f1f85c9fa6d68b5ebd8c0ad2e484}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Get\-Obstacle\-All@{r\-Get\-Obstacle\-All}}
\index{r\-Get\-Obstacle\-All@{r\-Get\-Obstacle\-All}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Get\-Obstacle\-All}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Get\-Obstacle\-All (
\begin{DoxyParamCaption}
\item[{int}]{obst\-Sensors\mbox{[}3\mbox{]}, }
\item[{int}]{sample\-Size}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a3a47f1f85c9fa6d68b5ebd8c0ad2e484}


Get the average values of the three obstacle sensors in an array. Since readings of each obstacle sensor can vary substantially (successive readings may differ by several hundred or more), each sensor can be queried sample\-Size times and an average obtained. 


\begin{DoxyParams}{Parameters}
{\em obst\-Sensors} & array to store intensity values \\
\hline
{\em sample\-Size} & how many readings are taken for each sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
space already allocated for obst\-Sensors array sample\-Size $>$ 0 
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
obst\-Sensors\mbox{[}0\mbox{]} gives average value for left sensor obst\-Sensors\mbox{[}1\mbox{]} gives average value for middle sensor obst\-Sensors\mbox{[}2\mbox{]} gives average value for right sensor Obstacle values near 0 represent no obstacle is seen Obstacle values may approach 6000 as obstacle gets close. 
\end{DoxyPostcond}
\begin{DoxyWarning}{Warning}
As battery degrades, sensor readings degrade, yielding systematically lower numbers.
\end{DoxyWarning}
Get the average values of the three obstacle sensors in an array. Since readings of each obstacle sensor can vary substantially (successive readings may differ by several hundred or more), each sensor can be queried sample\-Size times and an average obtained. 
\begin{DoxyParams}{Parameters}
{\em obst\-Sensors} & array to store intensity values \\
\hline
{\em sample\-Size} & how many readings are taken for each sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
space already allocated for obst\-Sensors array sample\-Size $>$ 0 
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
obst\-Sensors\mbox{[}0\mbox{]} gives average value for left sensor obst\-Sensors\mbox{[}1\mbox{]} gives average value for middle sensor obst\-Sensors\mbox{[}2\mbox{]} gives average value for right sensor Obstacle values near 0 represent no obstacle is seen Obstacle values may approach 6000 as obstacle gets close. 
\end{DoxyPostcond}
\begin{DoxyWarning}{Warning}
As battery degrades, sensor readings degrade, yielding systematically lower numbers. 
\end{DoxyWarning}
\hypertarget{MyroC_8h_a5853bf9f106b47ed0e767adf8fab0d0b}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Get\-Obstacle\-Txt@{r\-Get\-Obstacle\-Txt}}
\index{r\-Get\-Obstacle\-Txt@{r\-Get\-Obstacle\-Txt}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Get\-Obstacle\-Txt}]{\setlength{\rightskip}{0pt plus 5cm}int r\-Get\-Obstacle\-Txt (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{sensor\-Name, }
\item[{int}]{sample\-Size}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a5853bf9f106b47ed0e767adf8fab0d0b}


Get the average values of a specified obstacle (I\-R) sensor. Since values of each obstacle sensor can vary substantially (successive readings may differ by several hundred or more), the sensor can be queried sample\-Size times and an average obtained. 


\begin{DoxyParams}{Parameters}
{\em sensor\-Name} & name of the obstacle sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
sensor\-Name is \char`\"{}left\char`\"{}, \char`\"{}center\char`\"{}, \char`\"{}middle\char`\"{}, or \char`\"{}right\char`\"{} (not case sensitive) designations \char`\"{}center\char`\"{} and \char`\"{}middle\char`\"{} are alternatives for the same light sensor 
\end{DoxyPrecond}

\begin{DoxyParams}{Parameters}
{\em sample\-Size} & how many readings are taken for the sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
space already allocated for vals array sample\-Size $>$ 0 
\end{DoxyPrecond}
\begin{DoxyReturn}{Returns}
reading from the specified obstacle sensor, averaged over sample\-Size number of data samples Obstacle values near 0 represent no obstacle is seen Obstacle values may approach 6000 as obstacle gets close. 
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
As battery degrades, sensor values degrade, yielding systematically lower numbers.
\end{DoxyWarning}
Get the average values of a specified obstacle (I\-R) sensor. Since values of each obstacle sensor can vary substantially (successive readings may differ by several hundred or more), the sensor can be queried sample\-Size times and an average obtained. 
\begin{DoxyParams}{Parameters}
{\em sensor\-Name} & name of the obstacle sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
sensor\-Name is \char`\"{}left\char`\"{}, \char`\"{}center\char`\"{}, \char`\"{}middle\char`\"{}, or \char`\"{}right\char`\"{} (not case sensitive) designations \char`\"{}center\char`\"{} and \char`\"{}middle\char`\"{} are alternatives for the same light sensor 
\end{DoxyPrecond}

\begin{DoxyParams}{Parameters}
{\em sample\-Size} & how many readings are taken for the sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
space already allocated for vals array sample\-Size $>$ 0 
\end{DoxyPrecond}
\begin{DoxyReturn}{Returns}
reading from the specified obstacle sensor, averaged over sample\-Size number of data samples Obstacle values near 0 represent no obstacle is seen Obstacle values may approach 6000 as obstacle gets close. 
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
As battery degrades, sensor values degrade, yielding systematically lower numbers. 
\end{DoxyWarning}
\hypertarget{MyroC_8h_a9296f6acbac4ef59cfc6cb0dc535c60f}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Get\-Stall@{r\-Get\-Stall}}
\index{r\-Get\-Stall@{r\-Get\-Stall}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Get\-Stall}]{\setlength{\rightskip}{0pt plus 5cm}int r\-Get\-Stall (
\begin{DoxyParamCaption}
\item[{int}]{sample\-Size}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a9296f6acbac4ef59cfc6cb0dc535c60f}


Determine if robot has stalled Since readings of each brightness sensor can vary substantially, each sensor can be queried sample\-Size times and an average obtained. 


\begin{DoxyParams}{Parameters}
{\em sample\-Size} & how many readings are taken for each sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
sample\-Size $>$ 0 
\end{DoxyPrecond}
\begin{DoxyReturn}{Returns}
whether or not robot current has stalled 
\end{DoxyReturn}
\begin{DoxyPostcond}{Postcondition}
Returns 1 if the robot has stalled Returns 0 otherwise.
\end{DoxyPostcond}
Determine if robot has stalled Since readings of each brightness sensor can vary substantially, each sensor can be queried sample\-Size times and an average obtained. 
\begin{DoxyParams}{Parameters}
{\em sample\-Size} & how many readings are taken for each sensor \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
sample\-Size $>$ 0 
\end{DoxyPrecond}
\begin{DoxyReturn}{Returns}
whether or not robot current has stalled 
\end{DoxyReturn}
\begin{DoxyPostcond}{Postcondition}
Returns 1 if the robot has stalled Returns 0 otherwise. 
\end{DoxyPostcond}
\hypertarget{MyroC_8h_a22bed206f3ae7563a116be255e91906e}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Load\-Picture@{r\-Load\-Picture}}
\index{r\-Load\-Picture@{r\-Load\-Picture}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Load\-Picture}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Picture} r\-Load\-Picture (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{filename}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a22bed206f3ae7563a116be255e91906e}


Load a picture from a .jpeg file. 


\begin{DoxyParams}{Parameters}
{\em filename} & the name of the file \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
file must exist 

file must be a 256x192 .jpeg or .jpg 
\end{DoxyPrecond}
\begin{DoxyReturn}{Returns}
\hyperlink{structPicture}{Picture}
\end{DoxyReturn}
Load a picture from a .jpeg file. 
\begin{DoxyParams}{Parameters}
{\em filename} & the name of the file \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
file must exist 

file must be a 256x192 .jpeg or .jpg 
\end{DoxyPrecond}
\begin{DoxyReturn}{Returns}
\hyperlink{structPicture}{Picture} 
\end{DoxyReturn}
\hypertarget{MyroC_8h_a6712dd6e8442e19ff28158adeaf7c0d0}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Motors@{r\-Motors}}
\index{r\-Motors@{r\-Motors}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Motors}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Motors (
\begin{DoxyParamCaption}
\item[{double}]{left\-Speed, }
\item[{double}]{right\-Speed}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a6712dd6e8442e19ff28158adeaf7c0d0}


move robot with given speeds for the left and right motors continues until given another motion command or disconnected (non-\/blocking) 


\begin{DoxyParams}{Parameters}
{\em left\-Speed} & the rate at which the left wheel should turn linear range\-: -\/1.\-0 specifies move backward at full speed 0.\-0 specifies no forward/backward movement 1.\-0 specifies move forwardward at full speed \\
\hline
{\em right\-Speed} & the rate at which the right wheel should turn linear range\-: -\/1.\-0 specifies move backward at full speed 0.\-0 specifies no forward/backward movement 1.\-0 specifies move forward at full speed\\
\hline
\end{DoxyParams}
move robot with given speeds for the left and right motors continues until given another motion command or disconnected (non-\/blocking) 
\begin{DoxyParams}{Parameters}
{\em left\-Speed} & the rate at which the left wheel should turn linear range\-: -\/1.\-0 specifies move backward at full speed 0.\-0 specifies no forward/backward movement 1.\-0 specifies move forwardward at full speed \\
\hline
{\em right\-Speed} & the rate at which the right wheel should turn linear range\-: -\/1.\-0 specifies move backward at full speed 0.\-0 specifies no forward/backward movement 1.\-0 specifies move forward at full speed \\
\hline
\end{DoxyParams}
\hypertarget{MyroC_8h_aae5f14b4e6e28456e3a563b027052c02}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Save\-Picture@{r\-Save\-Picture}}
\index{r\-Save\-Picture@{r\-Save\-Picture}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Save\-Picture}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Save\-Picture (
\begin{DoxyParamCaption}
\item[{{\bf Picture}}]{pic, }
\item[{char $\ast$}]{filename}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_aae5f14b4e6e28456e3a563b027052c02}


Save a \hyperlink{structPicture}{Picture} to a .jpeg. 


\begin{DoxyParams}{Parameters}
{\em pic} & R\-G\-B picture struct from Scribbler 2 camera \\
\hline
{\em filename} & the name of the file \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
filename ends with .jpeg or .jpg. 
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
If the file does not exist, a new file will be created. 

If the file exists, the file will be overwritten.
\end{DoxyPostcond}
Save a \hyperlink{structPicture}{Picture} to a .jpeg 
\begin{DoxyParams}{Parameters}
{\em pic} & R\-G\-B picture struct from Scribbler 2 camera \\
\hline
{\em filename} & the name of the file \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
filename ends with .jpeg or .jpg. 
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
If the file does not exist, a new file will be created. 

If the file exists, the file will be overwritten. 
\end{DoxyPostcond}
\hypertarget{MyroC_8h_ac7c83fef113af1c3612ce59c03417e8b}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Set\-Bluetooth\-Echo@{r\-Set\-Bluetooth\-Echo}}
\index{r\-Set\-Bluetooth\-Echo@{r\-Set\-Bluetooth\-Echo}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Set\-Bluetooth\-Echo}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Set\-Bluetooth\-Echo (
\begin{DoxyParamCaption}
\item[{char}]{on\-Off}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_ac7c83fef113af1c3612ce59c03417e8b}


Turn on and off echoing of Bluetooth transmissions All robot commands involve the transmission of a command over Bluetooth Scribbler commands are always 9 bytes Fluke commands have varying lengths The fluke echos most, but not all, of the commands For many commands, the fluke also echos 11 bytes of sensor data. 


\begin{DoxyParams}{Parameters}
{\em on\-Off} & char 'y' enables echoing char 'n' disables echoing other character values ignored \\
\hline
\end{DoxyParams}
\hypertarget{MyroC_8h_a3c53b72530db178106d17242b205a196}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Set\-Connection@{r\-Set\-Connection}}
\index{r\-Set\-Connection@{r\-Set\-Connection}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Set\-Connection}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Set\-Connection (
\begin{DoxyParamCaption}
\item[{int}]{new\-\_\-socket\-\_\-num}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a3c53b72530db178106d17242b205a196}


set current connection to the socket number 


\begin{DoxyParams}{Parameters}
{\em new\-\_\-socket\-\_\-num} & the number of an open socket for communication \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
new\-\_\-socket\-\_\-num has been returned by r\-Connect the designated socket has not been closed
\end{DoxyPrecond}
set current connection to the socket number 
\begin{DoxyParams}{Parameters}
{\em new\-\_\-socket\-\_\-num} & the number of an open socket for communication \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
new\-\_\-socket\-\_\-num has been returned by r\-Connect the designated socket has not been closed 
\end{DoxyPrecond}
\hypertarget{MyroC_8h_a3753b86dcb4de002e8456501ca35edae}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Set\-Forwardness@{r\-Set\-Forwardness}}
\index{r\-Set\-Forwardness@{r\-Set\-Forwardness}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Set\-Forwardness}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Set\-Forwardness (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{direction}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a3753b86dcb4de002e8456501ca35edae}


specifies which end of the Scribbler is considered the front 


\begin{DoxyParams}{Parameters}
{\em direction} & identifies front direction \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
direction is either \char`\"{}fluke-\/forward\char`\"{} or \char`\"{}scribbler-\/forward\char`\"{} (not case sensitive)
\end{DoxyPrecond}
specifies which end of the Scribbler is considered the front 
\begin{DoxyParams}{Parameters}
{\em direction} & identifies front direction \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
direction is either \char`\"{}fluke-\/forward\char`\"{} or \char`\"{}scribbler-\/forward\char`\"{} (not case sensitive) 
\end{DoxyPrecond}
\hypertarget{MyroC_8h_ab319898f4ab7d48f15e1215db8e5b4ba}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Set\-I\-R\-Power@{r\-Set\-I\-R\-Power}}
\index{r\-Set\-I\-R\-Power@{r\-Set\-I\-R\-Power}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Set\-I\-R\-Power}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Set\-I\-R\-Power (
\begin{DoxyParamCaption}
\item[{int}]{power}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_ab319898f4ab7d48f15e1215db8e5b4ba}


Set the amount of power for the dongle's I\-R sensors. 


\begin{DoxyParams}{Parameters}
{\em power} & the desired power level for the I\-R sensors \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
power is between 0 and 255 (inclusive)
\end{DoxyPrecond}
Set the amount of power for the dongle's I\-R sensors 
\begin{DoxyParams}{Parameters}
{\em power} & the desired power level for the I\-R sensors \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
power is between 0 and 255 (inclusive) 
\end{DoxyPrecond}
\hypertarget{MyroC_8h_a2466176fa2332b88e5013d6b3fe9ceb8}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Set\-L\-E\-D\-Back@{r\-Set\-L\-E\-D\-Back}}
\index{r\-Set\-L\-E\-D\-Back@{r\-Set\-L\-E\-D\-Back}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Set\-L\-E\-D\-Back}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Set\-L\-E\-D\-Back (
\begin{DoxyParamCaption}
\item[{double}]{led}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a2466176fa2332b88e5013d6b3fe9ceb8}


Set the the intensity of the back fluke L\-E\-D,. 


\begin{DoxyParams}{Parameters}
{\em led} & intensity of the L\-E\-D values between 0 and 1 provide a range of brightness from off to full intensity values bigger than 1 are treated as 1 (full brightness) values less than 0 are treated as 0 (L\-E\-D off).\\
\hline
\end{DoxyParams}
Set the the intensity of the back fluke L\-E\-D, 
\begin{DoxyParams}{Parameters}
{\em led} & intensity of the L\-E\-D values between 0 and 1 provide a range of brightness from off to full intensity values bigger than 1 are treated as 1 (full brightness) values less than 0 are treated as 0 (L\-E\-D off). \\
\hline
\end{DoxyParams}
\hypertarget{MyroC_8h_a21581ded1f409300e8f63f4c41c2f2f0}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Set\-L\-E\-D\-Front@{r\-Set\-L\-E\-D\-Front}}
\index{r\-Set\-L\-E\-D\-Front@{r\-Set\-L\-E\-D\-Front}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Set\-L\-E\-D\-Front}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Set\-L\-E\-D\-Front (
\begin{DoxyParamCaption}
\item[{int}]{led}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a21581ded1f409300e8f63f4c41c2f2f0}


Set the front \mbox{[}fluke\mbox{]} L\-E\-D on or off. 


\begin{DoxyParams}{Parameters}
{\em led} & value 1 turns on L\-E\-D value 0 turns off L\-E\-D \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
led must be 0 or 1
\end{DoxyPrecond}
Set the front \mbox{[}fluke\mbox{]} L\-E\-D on or off 
\begin{DoxyParams}{Parameters}
{\em led} & value 1 turns on L\-E\-D value 0 turns off L\-E\-D \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
led must be 0 or 1 
\end{DoxyPrecond}
\hypertarget{MyroC_8h_ab6f8b6b28334162e70f7cf3a3b165e4b}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Set\-Name@{r\-Set\-Name}}
\index{r\-Set\-Name@{r\-Set\-Name}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Set\-Name}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Set\-Name (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{name}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_ab6f8b6b28334162e70f7cf3a3b165e4b}


Change name stored in the robot to the 16-\/byte name given. 


\begin{DoxyParams}{Parameters}
{\em name} & specifies new name of robot if $<$ 16 bytes given, name is filled with null characters if $>$= 16 bytes given, name is truncated to 15 bytes plus null\\
\hline
\end{DoxyParams}
Change name stored in the robot to the 16-\/byte name given 
\begin{DoxyParams}{Parameters}
{\em name} & specifies new name of robot if $<$ 16 bytes given, name is filled with null characters if $>$= 16 bytes given, name is truncated to 15 bytes plus null \\
\hline
\end{DoxyParams}
\hypertarget{MyroC_8h_a4e10733a73b58955046a5cf2252117a0}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Take\-Picture@{r\-Take\-Picture}}
\index{r\-Take\-Picture@{r\-Take\-Picture}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Take\-Picture}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Picture} r\-Take\-Picture (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a4e10733a73b58955046a5cf2252117a0}


Use the camera to take a photo. 

\begin{DoxyReturn}{Returns}
\hyperlink{structPicture}{Picture}
\end{DoxyReturn}
Use the camera to take a photo \begin{DoxyReturn}{Returns}
\hyperlink{structPicture}{Picture} 
\end{DoxyReturn}
\hypertarget{MyroC_8h_a1b2462eb7a3149a89cfe73f39339ed89}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Turn\-Left@{r\-Turn\-Left}}
\index{r\-Turn\-Left@{r\-Turn\-Left}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Turn\-Left}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Turn\-Left (
\begin{DoxyParamCaption}
\item[{double}]{speed, }
\item[{double}]{time}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a1b2462eb7a3149a89cfe73f39339ed89}


turn Scribbler left for a specified time and speed 


\begin{DoxyParams}{Parameters}
{\em speed} & the rate at which the robot should move left linear range\-: -\/1.\-0 specifies right turn at full speed 0.\-0 specifies no turn 1.\-0 specifies left turn at full speed \\
\hline
{\em time} & specifies the duration of the turn if negative\-: robot continues to turn until given another motion command or disconnected (non-\/blocking) if nonnegative\-: robot turns for the given duration, in seconds\\
\hline
\end{DoxyParams}
turn Scribbler left for a specified time and speed 
\begin{DoxyParams}{Parameters}
{\em speed} & the rate at which the robot should move left linear range\-: -\/1.\-0 specifies right turn at full speed 0.\-0 specifies no turn 1.\-0 specifies left turn at full speed \\
\hline
{\em time} & specifies the duration of the turn if negative\-: robot continues to turn until given another motion command or disconnected (non-\/blocking) if nonnegative\-: robot turns for the given duration, in seconds \\
\hline
\end{DoxyParams}
\hypertarget{MyroC_8h_a0c3496dd17992e9788110c15c017e566}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Turn\-Right@{r\-Turn\-Right}}
\index{r\-Turn\-Right@{r\-Turn\-Right}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Turn\-Right}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Turn\-Right (
\begin{DoxyParamCaption}
\item[{double}]{speed, }
\item[{double}]{time}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_a0c3496dd17992e9788110c15c017e566}


turn Scribbler right for a specified time and speed 


\begin{DoxyParams}{Parameters}
{\em speed} & the rate at which the robot should move right linear range\-: -\/1.\-0 specifies left turn at full speed 0.\-0 specifies no turn 1.\-0 specifies right turn at full speed \\
\hline
{\em time} & specifies the duration of the turn if negative\-: robot continues to turn until given another motion command or disconnected (non-\/blocking) if nonnegative\-: robot turns for the given duration, in seconds\\
\hline
\end{DoxyParams}
turn Scribbler right for a specified time and speed 
\begin{DoxyParams}{Parameters}
{\em speed} & the rate at which the robot should move right linear range\-: -\/1.\-0 specifies left turn at full speed 0.\-0 specifies no turn 1.\-0 specifies right turn at full speed \\
\hline
{\em time} & specifies the duration of the turn if negative\-: robot continues to turn until given another motion command or disconnected (non-\/blocking) if nonnegative\-: robot turns for the given duration, in seconds \\
\hline
\end{DoxyParams}
\hypertarget{MyroC_8h_aa1a97cc92ee785afb8af4e248d08cbb9}{\index{Myro\-C.\-h@{Myro\-C.\-h}!r\-Turn\-Speed@{r\-Turn\-Speed}}
\index{r\-Turn\-Speed@{r\-Turn\-Speed}!MyroC.h@{Myro\-C.\-h}}
\subsubsection[{r\-Turn\-Speed}]{\setlength{\rightskip}{0pt plus 5cm}void r\-Turn\-Speed (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{direction, }
\item[{double}]{speed, }
\item[{double}]{time}
\end{DoxyParamCaption}
)}}\label{MyroC_8h_aa1a97cc92ee785afb8af4e248d08cbb9}


turn Scribbler in direction for a specified time and speed 


\begin{DoxyParams}{Parameters}
{\em direction} & direction of turn, based on looking from the center of the robot and facing forward \\
\hline
{\em speed} & the rate at which the robot should move forward linear range\-: -\/1.\-0 specifies turn at full speed 0.\-0 specifies no turn 1.\-0 specifies turn at full speed \\
\hline
{\em time} & specifies the duration of the turn if negative\-: robot continues to turn until given another motion command or disconnected if nonnegative\-: robot turns for the given duration, in seconds \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
direction is \char`\"{}left\char`\"{} or \char`\"{}right\char`\"{}, case insensitive
\end{DoxyPrecond}
turn Scribbler in direction for a specified time and speed 
\begin{DoxyParams}{Parameters}
{\em direction} & direction of turn, based on looking from the center of the robot and facing forward \\
\hline
{\em speed} & the rate at which the robot should move forward linear range\-: -\/1.\-0 specifies turn at full speed 0.\-0 specifies no turn 1.\-0 specifies turn at full speed \\
\hline
{\em time} & specifies the duration of the turn if negative\-: robot continues to turn until given another motion command or disconnected if nonnegative\-: robot turns for the given duration, in seconds \\
\hline
\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
direction is \char`\"{}left\char`\"{} or \char`\"{}right\char`\"{}, case insensitive 
\end{DoxyPrecond}
