\doxysection{test2.\+ino}
\hypertarget{test2_8ino_source}{}\label{test2_8ino_source}\index{examples/test2/test2.ino@{examples/test2/test2.ino}}
\mbox{\hyperlink{test2_8ino}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00001}00001\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00002}00002\ \textcolor{comment}{\ *\ @file\ test2.ino}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00003}00003\ \textcolor{comment}{\ *\ @brief\ Extended\ accelerometer\ DLPF,\ full-\/scale,\ and\ averaging\ sweep.}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00004}00004\ \textcolor{comment}{\ *\ @author\ Jonathan\ Mejorado\ Lopez}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00005}00005\ \textcolor{comment}{\ *\ @details\ Runs\ a\ larger\ I2C\ validation\ matrix\ for\ the\ DevLab\ ICM-\/20948}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00006}00006\ \textcolor{comment}{\ *\ accelerometer\ and\ prints\ CSV-\/like\ samples\ for\ later\ analysis.}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00007}00007\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00008}00008\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00009}00009\ \textcolor{preprocessor}{\#include\ <Wire.h>}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00010}00010\ \textcolor{preprocessor}{\#include\ <\mbox{\hyperlink{DevLab__ICM20948_8h}{DevLab\_ICM20948.h}}>}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00011}00011\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00012}00012\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00013}00013\ \textcolor{comment}{//\ PINES\ I2C\ —\ ESP32C6\ NANO\ Unit\ Electronics}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00014}00014\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00015}00015\ \textcolor{comment}{/**\ @brief\ I2C\ SDA\ pin\ used\ by\ the\ example\ board.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00016}\mbox{\hyperlink{test2_8ino_a526d580d324bce60a3e964066fae77e3}{00016}}\ \textcolor{preprocessor}{\#define\ SDA\_PIN\ \ \ 6}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00017}00017\ \textcolor{comment}{/**\ @brief\ I2C\ SCL\ pin\ used\ by\ the\ example\ board.\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00018}\mbox{\hyperlink{test2_8ino_a06c967e78bcedcee909a70764f879433}{00018}}\ \textcolor{preprocessor}{\#define\ SCL\_PIN\ \ \ 7}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00019}00019\ \textcolor{comment}{/**\ @brief\ I2C\ bus\ speed\ in\ hertz.\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00020}\mbox{\hyperlink{test2_8ino_a8b7500a141450a9df212017430c0df9e}{00020}}\ \textcolor{preprocessor}{\#define\ I2C\_FREQ\ \ 400000UL}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00021}00021\ \textcolor{comment}{/**\ @brief\ ICM-\/20948\ I2C\ address\ selected\ by\ the\ AD0\ pin.\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00022}\mbox{\hyperlink{test2_8ino_a8fb98755bd25ab9d5bf8739e15df6eeb}{00022}}\ \textcolor{preprocessor}{\#define\ ICM\_ADDR\ \ 0x69}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00023}00023\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00024}00024\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00025}00025\ \textcolor{comment}{//\ STRUCT}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00026}00026\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00027}00027\ \textcolor{comment}{/**\ @brief\ Accelerometer\ DLPF\ divider\ and\ timing\ configuration.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00028}00028\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structconfigDLPF}{configDLPF}}\ \{\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00029}00029\ \textcolor{comment}{\ \ /**\ @brief\ Index\ into\ the\ accelDLPF\ lookup\ table.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00030}00030\ \ \ uint8\_t\ \ \ \ \ \mbox{\hyperlink{structconfigDLPF_a3e61183bf0cc5e5fdbfddb96b2adc9c2}{dlpf\_idx}};\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00031}00031\ \textcolor{comment}{\ \ /**\ @brief\ Sample-\/rate\ divider\ written\ to\ the\ IMU\ register.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00032}00032\ \ \ uint16\_t\ \ \ \ \mbox{\hyperlink{structconfigDLPF_a522bdaa9ec30e1a07c1e1c7d1a228946}{div}};\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00033}00033\ \textcolor{comment}{\ \ /**\ @brief\ Noise\ bandwidth\ in\ hertz\ for\ reporting.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00034}00034\ \ \ \textcolor{keywordtype}{float}\ \ \ \ \ \ \ \mbox{\hyperlink{structconfigDLPF_a810cc6538484c5984d1ad25e1f554370}{nbw\_hz}};\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00035}00035\ \textcolor{comment}{\ \ /**\ @brief\ Output\ data\ rate\ in\ hertz\ for\ timing\ calculations.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00036}00036\ \ \ \textcolor{keywordtype}{float}\ \ \ \ \ \ \ \mbox{\hyperlink{structconfigDLPF_a258433764b5ca0dfbc1636b6ac90d27d}{odr\_hz}};\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00037}00037\ \textcolor{comment}{\ \ /**\ @brief\ Text\ label\ printed\ with\ each\ captured\ sample.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00038}00038\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}*\ \mbox{\hyperlink{structconfigDLPF_a4d1ecadff3d90a4666035aa9ba3dc166}{nombre}};}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00039}00039\ \};}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00040}00040\ \textcolor{comment}{//id,div,nbw\_hz,odr\_hz,nombre\ :\ \{DLPF,\ NBW\ ,\ ODR\}}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00041}00041\ \textcolor{comment}{/**\ @brief\ Accelerometer\ DLPF\ configurations\ exercised\ by\ this\ sweep.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00042}\mbox{\hyperlink{test2_8ino_a9ef8fe0f793376a22cc3d83386c3b86a}{00042}}\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structconfigDLPF}{configDLPF}}\ \mbox{\hyperlink{test2_8ino_a9ef8fe0f793376a22cc3d83386c3b86a}{configsDLPF}}[]\ =\ \{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00043}00043\ \ \ \{\ \ 0,\ \ \ 0,\ \ 265.0f,\ 1125.0f,\ \textcolor{stringliteral}{"{}246\ ;\ 265\ ;\ 1125\ "{}}\ \},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00044}00044\ \ \ \{\ \ 1,\ \ \ 0,\ \ 265.0f,\ 1125.0f,\ \textcolor{stringliteral}{"{}246\ ;\ 265\ ;\ 1125\ "{}}\ \},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00045}00045\ \ \ \{\ \ 2,\ \ \ 1,\ \ 136.0f,\ \ 562.5f,\ \textcolor{stringliteral}{"{}111\ ;\ 136\ ;\ 562\ "{}}\ \},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00046}00046\ \ \ \{\ \ 3,\ \ \ 2,\ \ \ 68.8f,\ \ 375.0f,\ \textcolor{stringliteral}{"{}50\ ;\ 69\ ;\ 375\ "{}}\ \},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00047}00047\ \ \ \{\ \ 4,\ \ \ 7,\ \ \ 34.4f,\ \ 140.6f,\ \textcolor{stringliteral}{"{}24\ ;\ 34\ ;\ 141\ "{}}\ \},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00048}00048\ \ \ \{\ \ 5,\ \ 15,\ \ \ 17.0f,\ \ \ 70.3f,\ \textcolor{stringliteral}{"{}12\ ;\ 17\ ;\ \ 70\ "{}}\ \},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00049}00049\ \ \ \{\ \ 6,\ \ 29,\ \ \ \ 8.3f,\ \ \ 37.5f,\ \textcolor{stringliteral}{"{}6\ ;\ 8\ ;\ \ 35\ "{}}\ \},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00050}00050\ \ \ \{\ \ 7,\ \ \ 0,\ \ 499.0f,\ 1125.0f,\ \textcolor{stringliteral}{"{}473\ ;\ 499\ ;\ 1125\ "{}}\ \},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00051}00051\ \};\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00052}00052\ \textcolor{comment}{/**\ @brief\ Number\ of\ accelerometer\ DLPF\ configurations.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00053}\mbox{\hyperlink{test2_8ino_a7a9c77b04f25920366c8b7b1e13d4854}{00053}}\ \textcolor{keyword}{const}\ uint8\_t\ \mbox{\hyperlink{test2_8ino_a7a9c77b04f25920366c8b7b1e13d4854}{N\_DLPF}}\ =\ \textcolor{keyword}{sizeof}(\mbox{\hyperlink{test2_8ino_a9ef8fe0f793376a22cc3d83386c3b86a}{configsDLPF}})\ /\ \textcolor{keyword}{sizeof}(\mbox{\hyperlink{test2_8ino_a9ef8fe0f793376a22cc3d83386c3b86a}{configsDLPF}}[0]);}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00054}00054\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00055}00055\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00056}00056\ \textcolor{comment}{//\ ARRAYS\ ORIGINALES}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00057}00057\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00058}00058\ \textcolor{comment}{/**\ @brief\ Accelerometer\ full-\/scale\ ranges\ exercised\ by\ the\ sweep.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00059}\mbox{\hyperlink{test2_8ino_afba242a959acc49646be317c43c4bc51}{00059}}\ \textcolor{keyword}{const}\ \mbox{\hyperlink{DevLab__ICM20948_8h_a7d56bdd11158e2d05da5c9317fadee05}{ICM20948\_Accel\_FullScale}}\ \mbox{\hyperlink{test2_8ino_afba242a959acc49646be317c43c4bc51}{accelCfg}}[]\ =\ \{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00060}00060\ \ \ \mbox{\hyperlink{DevLab__ICM20948_8h_a7d56bdd11158e2d05da5c9317fadee05aade318cc7367b7f1b4127eddc5f4899f}{ICM20948\_Accel\_FullScale::G\_2}},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00061}00061\ \ \ \mbox{\hyperlink{DevLab__ICM20948_8h_a7d56bdd11158e2d05da5c9317fadee05abda3c606e1ce64e3bda86c1fe6232693}{ICM20948\_Accel\_FullScale::G\_4}},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00062}00062\ \ \ \mbox{\hyperlink{DevLab__ICM20948_8h_a7d56bdd11158e2d05da5c9317fadee05a7526fbbb8f59b17de642323ac8f156aa}{ICM20948\_Accel\_FullScale::G\_8}},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00063}00063\ \ \ \mbox{\hyperlink{DevLab__ICM20948_8h_a7d56bdd11158e2d05da5c9317fadee05a0ab58ba0a5550a73055a08e4c20ee549}{ICM20948\_Accel\_FullScale::G\_16}}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00064}00064\ \};\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00065}00065\ \textcolor{comment}{/**\ @brief\ Text\ labels\ matching\ accelCfg.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00066}\mbox{\hyperlink{test2_8ino_a14ebfda2dc5c37c8a8080f828f9fecf8}{00066}}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}*\ \mbox{\hyperlink{test2_8ino_a14ebfda2dc5c37c8a8080f828f9fecf8}{etiquetasAccelCfg}}[]\ =\ \{\ \textcolor{stringliteral}{"{}+-\/2G"{}},\textcolor{stringliteral}{"{}+-\/4G"{}},\textcolor{stringliteral}{"{}+-\/8G"{}},\textcolor{stringliteral}{"{}+-\/16G"{}}\ \};\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00067}00067\ \textcolor{comment}{/**\ @brief\ Number\ of\ accelerometer\ full-\/scale\ ranges.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00068}\mbox{\hyperlink{test2_8ino_a6e9ca5bda437536b80c2d5b592629088}{00068}}\ \textcolor{keyword}{const}\ uint8\_t\ \mbox{\hyperlink{test2_8ino_a6e9ca5bda437536b80c2d5b592629088}{N\_FS}}\ =\ 4;}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00069}00069\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00070}00070\ \textcolor{comment}{/**\ @brief\ Accelerometer\ DLPF\ enum\ values\ matching\ configsDLPF.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00071}\mbox{\hyperlink{test2_8ino_a1aaf273f25b97fc05866f455e73b7ba9}{00071}}\ \textcolor{keyword}{const}\ \mbox{\hyperlink{DevLab__ICM20948_8h_a62506f4660c8cca0e4f2d55cc6cea833}{ICM20948\_Accel\_DLPFCFG}}\ \mbox{\hyperlink{test2_8ino_a1aaf273f25b97fc05866f455e73b7ba9}{accelDLPF}}[]\ =\ \{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00072}00072\ \ \ \mbox{\hyperlink{DevLab__ICM20948_8h_a62506f4660c8cca0e4f2d55cc6cea833a13cbb7979b56e04b08ae1fce52de8920}{ICM20948\_Accel\_DLPFCFG::DLPF0\_246HZ}},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00073}00073\ \ \ \mbox{\hyperlink{DevLab__ICM20948_8h_a62506f4660c8cca0e4f2d55cc6cea833aeeb64eacdc3d03767db5a3801123bfb4}{ICM20948\_Accel\_DLPFCFG::DLPF\_246HZ}},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00074}00074\ \ \ \mbox{\hyperlink{DevLab__ICM20948_8h_a62506f4660c8cca0e4f2d55cc6cea833afe0dbe8c5c9de890080dc391ebe993c9}{ICM20948\_Accel\_DLPFCFG::DLPF\_111HZ}},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00075}00075\ \ \ \mbox{\hyperlink{DevLab__ICM20948_8h_a62506f4660c8cca0e4f2d55cc6cea833a1b0dedc13cdfd5d62bb48c2ad2fa704b}{ICM20948\_Accel\_DLPFCFG::DLPF\_50HZ}},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00076}00076\ \ \ \mbox{\hyperlink{DevLab__ICM20948_8h_a62506f4660c8cca0e4f2d55cc6cea833a4b000385ff347b34dfec18d96059bd64}{ICM20948\_Accel\_DLPFCFG::DLPF\_24HZ}},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00077}00077\ \ \ \mbox{\hyperlink{DevLab__ICM20948_8h_a62506f4660c8cca0e4f2d55cc6cea833aa94e8735e478a9c88792525ccbcc679a}{ICM20948\_Accel\_DLPFCFG::DLPF\_12HZ}},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00078}00078\ \ \ \mbox{\hyperlink{DevLab__ICM20948_8h_a62506f4660c8cca0e4f2d55cc6cea833afc7f83a30afbfee6d61610e4089ac326}{ICM20948\_Accel\_DLPFCFG::DLPF\_6HZ}},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00079}00079\ \ \ \mbox{\hyperlink{DevLab__ICM20948_8h_a62506f4660c8cca0e4f2d55cc6cea833af80e05f16aaf83801216cef7d6a5446f}{ICM20948\_Accel\_DLPFCFG::DLPF\_473HZ}}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00080}00080\ \};}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00081}00081\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00082}00082\ \textcolor{comment}{/**\ @brief\ Accelerometer\ averaging\ settings\ exercised\ by\ the\ sweep.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00083}\mbox{\hyperlink{test2_8ino_a44172cfd2be3fc4ff6f7b1fb343d2ec4}{00083}}\ \textcolor{keyword}{const}\ \mbox{\hyperlink{DevLab__ICM20948_8h_a792c56c75cabcab23c273bd9a48aefa9}{ICM20948\_Accel\_Average}}\ \mbox{\hyperlink{test2_8ino_a44172cfd2be3fc4ff6f7b1fb343d2ec4}{accelAVG}}[]\ =\ \{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00084}00084\ \ \ \mbox{\hyperlink{DevLab__ICM20948_8h_a792c56c75cabcab23c273bd9a48aefa9aebd0ae3f26f35e0266d46e0b767eeadc}{ICM20948\_Accel\_Average::AVG\_1\_OR\_4}},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00085}00085\ \ \ \mbox{\hyperlink{DevLab__ICM20948_8h_a792c56c75cabcab23c273bd9a48aefa9a682b1e1305b78c070fc0d38523969924}{ICM20948\_Accel\_Average::AVG\_8}},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00086}00086\ \ \ \mbox{\hyperlink{DevLab__ICM20948_8h_a792c56c75cabcab23c273bd9a48aefa9ad52a23a3a06614aefd7b8c55510f95f6}{ICM20948\_Accel\_Average::AVG\_16}},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00087}00087\ \ \ \mbox{\hyperlink{DevLab__ICM20948_8h_a792c56c75cabcab23c273bd9a48aefa9a5a625254a69fb541caa23fed503c1e2b}{ICM20948\_Accel\_Average::AVG\_32}}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00088}00088\ \};\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00089}00089\ \textcolor{comment}{/**\ @brief\ Text\ labels\ matching\ accelAVG.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00090}\mbox{\hyperlink{test2_8ino_a1e7d1f7dded2d3dfeb778c3cfcc91dea}{00090}}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}*\ \mbox{\hyperlink{test2_8ino_a1e7d1f7dded2d3dfeb778c3cfcc91dea}{etiquetasAccelAVG}}[]\ =\ \{\ \textcolor{stringliteral}{"{}14"{}},\textcolor{stringliteral}{"{}8"{}},\textcolor{stringliteral}{"{}16"{}},\textcolor{stringliteral}{"{}32"{}}\ \};\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00091}00091\ \textcolor{comment}{/**\ @brief\ Number\ of\ accelerometer\ averaging\ settings.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00092}\mbox{\hyperlink{test2_8ino_a0d5bdf34da5950970f04fcb4d629a48a}{00092}}\ \textcolor{keyword}{const}\ uint8\_t\ \mbox{\hyperlink{test2_8ino_a0d5bdf34da5950970f04fcb4d629a48a}{N\_AVG}}\ =\ 4;\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00093}00093\ \textcolor{comment}{/**\ @brief\ Raw\ accelerometer\ sample-\/rate\ divider\ values\ for\ experiments.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00094}\mbox{\hyperlink{test2_8ino_afa2564ef9650479c8ec39b52d193fbbd}{00094}}\ \textcolor{keyword}{const}\ uint16\_t\ \mbox{\hyperlink{test2_8ino_afa2564ef9650479c8ec39b52d193fbbd}{accelSR}}[]\ =\ \{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00095}00095\ \ \ 0,\ 1,\ 3,\ 5,\ 7,\ 10,\ 15,\ 22,\ 31,\ 63,\ 127,\ 255,\ 513,\ 1022,\ 2044,\ 4095}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00096}00096\ \};\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00097}00097\ \textcolor{comment}{/**\ @brief\ Text\ labels\ matching\ accelSR\ output\ data\ rates.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00098}\mbox{\hyperlink{test2_8ino_aab3a263352ee1fbbca9fe5acf2cd19eb}{00098}}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}*\ \mbox{\hyperlink{test2_8ino_aab3a263352ee1fbbca9fe5acf2cd19eb}{etiquetasSR}}[]\ =\ \{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00099}00099\ \ \ \textcolor{stringliteral}{"{}1125.0"{}},\textcolor{stringliteral}{"{}562.5"{}},\textcolor{stringliteral}{"{}281.3"{}},\textcolor{stringliteral}{"{}187.5"{}},\textcolor{stringliteral}{"{}140.6"{}},\textcolor{stringliteral}{"{}102.3"{}},\textcolor{stringliteral}{"{}70.3"{}},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00100}00100\ \ \ \textcolor{stringliteral}{"{}48.9"{}},\textcolor{stringliteral}{"{}35.2"{}},\textcolor{stringliteral}{"{}17.6"{}},\textcolor{stringliteral}{"{}8.8"{}},\textcolor{stringliteral}{"{}4.4"{}},\textcolor{stringliteral}{"{}2.2"{}},\textcolor{stringliteral}{"{}1.1"{}},\textcolor{stringliteral}{"{}0.55"{}},\textcolor{stringliteral}{"{}0.27"{}}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00101}00101\ \};}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00102}00102\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00103}00103\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00104}00104\ \textcolor{comment}{/**\ @brief\ Global\ ICM-\/20948\ driver\ instance.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00105}\mbox{\hyperlink{test2_8ino_aa8226278adaa3f7fb2ad8b966f7787a1}{00105}}\ \mbox{\hyperlink{classDevLab__ICM20948}{DevLab\_ICM20948}}\ \mbox{\hyperlink{test2_8ino_aa8226278adaa3f7fb2ad8b966f7787a1}{imu}};\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00106}00106\ \textcolor{comment}{/**\ @brief\ Count\ of\ validation\ passes\ reserved\ for\ future\ checks.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00107}\mbox{\hyperlink{test2_8ino_ac52922d562439e55245447f152baaf1b}{00107}}\ uint8\_t\ \mbox{\hyperlink{test2_8ino_ac52922d562439e55245447f152baaf1b}{total\_pass}}\ =\ 0;\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00108}00108\ \textcolor{comment}{/**\ @brief\ Count\ of\ validation\ failures\ reserved\ for\ future\ checks.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00109}\mbox{\hyperlink{test2_8ino_a1bf762e03a9be2534f36ec8a2611c341}{00109}}\ uint8\_t\ \mbox{\hyperlink{test2_8ino_a1bf762e03a9be2534f36ec8a2611c341}{total\_fail}}\ =\ 0;\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00110}00110\ \textcolor{comment}{/**\ @brief\ Count\ of\ validation\ warnings\ reserved\ for\ future\ checks.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00111}\mbox{\hyperlink{test2_8ino_ae452872d489cfa87ffe02f8cf8718a43}{00111}}\ uint8\_t\ \mbox{\hyperlink{test2_8ino_ae452872d489cfa87ffe02f8cf8718a43}{total\_warn}}\ =\ 0;}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00112}00112\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00113}00113\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00114}00114\ \textcolor{comment}{/**\ @brief\ Print\ a\ separator\ line\ to\ Serial.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00115}\mbox{\hyperlink{test2_8ino_a8765c1cf679c82cf73a0a13af44b983b}{00115}}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{test2_8ino_a8765c1cf679c82cf73a0a13af44b983b}{printLinea}}()\ \ \ \ \ \ \{\ Serial.println(F(\textcolor{stringliteral}{"{}-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/"{}}));\ \}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00116}00116\ \textcolor{comment}{/**\ @brief\ Print\ a\ double\ separator\ line\ to\ Serial.\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00117}\mbox{\hyperlink{test2_8ino_a42633dcf8fe2689c57c8113825f74c66}{00117}}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{test2_8ino_a42633dcf8fe2689c57c8113825f74c66}{printDobleLinea}}()\ \{\ Serial.println(F(\textcolor{stringliteral}{"{}============================================================"{}}));\ \}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00118}00118\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00119}00119\ \textcolor{comment}{//\ WHO\_AM\_I}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00120}00120\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00121}00121\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00122}00122\ \textcolor{comment}{\ *\ @brief\ Verify\ the\ IMU\ identity\ register.}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00123}00123\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00124}\mbox{\hyperlink{test2_8ino_a1cf9f29034d9373db6498335da3d661c}{00124}}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{test2_8ino_a1cf9f29034d9373db6498335da3d661c}{firstStage}}()\ \{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00125}00125\ \ \ uint8\_t\ who;}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00126}00126\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{test2_8ino_aa8226278adaa3f7fb2ad8b966f7787a1}{imu}}.\mbox{\hyperlink{classDevLab__ICM20948_a8bef7eafb3b67eb736f491d0df453b9e}{readWhoAmI}}(who)\ ||\ who\ !=\ 0xEA)\ \{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00127}00127\ \ \ \ \ Serial.println(F(\textcolor{stringliteral}{"{}ERROR:\ WHO\_AM\_I\ mismatch"{}}));}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00128}00128\ \ \ \ \ \textcolor{keywordflow}{while}\ (1)\ delay(200);}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00129}00129\ \ \ \}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00130}00130\ \ \ Serial.printf(\textcolor{stringliteral}{"{}WHO\_AM\_I\ =\ 0x\%02X\ \ OK\(\backslash\)n"{}},\ who);}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00131}00131\ \}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00132}00132\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00133}00133\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00134}00134\ \textcolor{comment}{//\ APLICAR\ CONFIGURACION}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00135}00135\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00136}00136\ \textcolor{comment}{//\ FIX\ 1:\ Se\ agregan\ ambas\ llamadas\ a\ setAccelDLPF:}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00137}00137\ \textcolor{comment}{//\ \ \ Llamada\ 1\ (bypass=false):\ escribe\ bits\ DLPFCFG,\ deja\ FCHOICE=0}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00138}00138\ \textcolor{comment}{//\ \ \ Llamada\ 2\ (bypass=true):\ \ activa\ FCHOICE=1\ sin\ tocar\ DLPFCFG}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00139}00139\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00140}00140\ \textcolor{comment}{//\ FIX\ 2:\ setAccelDivRate\ escribe\ el\ DIV\ directo\ al\ registro}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00141}00141\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00142}00142\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00143}00143\ \textcolor{comment}{\ *\ @brief\ Apply\ one\ accelerometer\ full-\/scale,\ DLPF,\ and\ averaging\ configuration.}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00144}00144\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00145}00145\ \textcolor{comment}{\ *\ @param\ fs\_idx\ Index\ into\ accelCfg.}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00146}00146\ \textcolor{comment}{\ *\ @param\ cfg\ DLPF\ timing\ and\ divider\ configuration.}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00147}00147\ \textcolor{comment}{\ *\ @param\ avg\ Index\ into\ accelAVG.}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00148}00148\ \textcolor{comment}{\ *\ @return\ true\ if\ all\ configuration\ writes\ succeeded,\ otherwise\ false.}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00149}00149\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00150}\mbox{\hyperlink{test2_8ino_a73c1d2766fc4db839bb9adf5cab93c80}{00150}}\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{mag__test_8ino_af42a493b8d96759f43d866fbe725cf3d}{applySettings}}(uint8\_t\ fs\_idx,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structconfigDLPF}{configDLPF}}\ \&cfg,uint8\_t\ avg)\ \{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00151}00151\ \ \ uint8\_t\ dlpf\_val\ =\ (uint8\_t)\mbox{\hyperlink{test2_8ino_a1aaf273f25b97fc05866f455e73b7ba9}{accelDLPF}}[cfg.\mbox{\hyperlink{structconfigDLPF_a3e61183bf0cc5e5fdbfddb96b2adc9c2}{dlpf\_idx}}];}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00152}00152\ \ \ \textcolor{keywordtype}{bool}\ ok\ =\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00153}00153\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00154}00154\ \ \ ok\ \&=\ \mbox{\hyperlink{test2_8ino_aa8226278adaa3f7fb2ad8b966f7787a1}{imu}}.\mbox{\hyperlink{classDevLab__ICM20948_a1a2aa0019d5e1c6ba8ce4a3c1d9fcb43}{setAccelScale}}(\mbox{\hyperlink{test2_8ino_afba242a959acc49646be317c43c4bc51}{accelCfg}}[fs\_idx]);}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00155}00155\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00156}00156\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00157}00157\ \ \ \textcolor{comment}{//\ Paso\ 1:\ escribe\ DLPFCFG\ en\ bits\ [5:3]}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00158}00158\ \ \ ok\ \&=\ \mbox{\hyperlink{test2_8ino_aa8226278adaa3f7fb2ad8b966f7787a1}{imu}}.\mbox{\hyperlink{classDevLab__ICM20948_ac52d80aad738b90aa0f05e9d6404bb85}{setAccelDLPF}}(dlpf\_val,\ \textcolor{keyword}{false});}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00159}00159\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00160}00160\ \ \ ok\ \&=\ \mbox{\hyperlink{test2_8ino_aa8226278adaa3f7fb2ad8b966f7787a1}{imu}}.\mbox{\hyperlink{classDevLab__ICM20948_a619f82390347cc173d1604d4d711b537}{setAccelAveraging}}(\mbox{\hyperlink{test2_8ino_a44172cfd2be3fc4ff6f7b1fb343d2ec4}{accelAVG}}[avg]);}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00161}00161\ \ \ \textcolor{comment}{//\ Paso\ 2:\ activa\ FCHOICE=1\ (DLPF\ activo)\ sin\ tocar\ DLPFCFG}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00162}00162\ \ \ \textcolor{comment}{//ok\ \&=\ imu.setAccelDLPF(0,\ true);}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00163}00163\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00164}00164\ \ \ \textcolor{comment}{//\ DIV\ directo\ al\ registro,\ sin\ conversion\ interna}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00165}00165\ \ \ ok\ \&=\ \mbox{\hyperlink{test2_8ino_aa8226278adaa3f7fb2ad8b966f7787a1}{imu}}.\mbox{\hyperlink{classDevLab__ICM20948_aca0cb8da36b8e9128299b9aeb5bb60ec}{setAccelDivRate}}(cfg.\mbox{\hyperlink{structconfigDLPF_a522bdaa9ec30e1a07c1e1c7d1a228946}{div}});}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00166}00166\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00167}00167\ \ \ \textcolor{keywordflow}{return}\ ok;}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00168}00168\ \}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00169}00169\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00170}00170\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00171}00171\ \textcolor{comment}{//\ SWEEP\ —\ MODO\ VERIFICACION}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00172}00172\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00173}00173\ \textcolor{comment}{//\ Por\ cada\ configuracion\ DLPF:}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00174}00174\ \textcolor{comment}{//\ \ \ 1.\ Aplica\ la\ config\ (FS\ fijo\ en\ +-\/2g\ para\ verificacion)}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00175}00175\ \textcolor{comment}{//\ \ \ 2.\ Espera\ settle\ del\ filtro}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00176}00176\ \textcolor{comment}{//\ \ \ 3.\ Imprime\ 3\ lecturas\ reales}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00177}00177\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00178}00178\ \textcolor{comment}{//\ Cuando\ las\ lecturas\ muestren\ Az\ \string~1g\ en\ reposo,}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00179}00179\ \textcolor{comment}{//\ el\ sensor\ esta\ funcionando\ y\ se\ puede\ activar\ el\ sweep\ completo.}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00180}00180\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00181}00181\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00182}00182\ \textcolor{comment}{\ *\ @brief\ Run\ the\ full\ accelerometer\ validation\ matrix\ and\ print\ samples.}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00183}00183\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00184}\mbox{\hyperlink{test2_8ino_a59a0400232b9ffe7d4395b166f74593a}{00184}}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{test2_8ino_a59a0400232b9ffe7d4395b166f74593a}{runSweep}}()\ \{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00185}00185\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00186}00186\ \ \ uint16\_t\ n\ =\ 0;}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00187}00187\ \ \ \mbox{\hyperlink{test2_8ino_a42633dcf8fe2689c57c8113825f74c66}{printDobleLinea}}();}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00188}00188\ \ \ Serial.println(F(\textcolor{stringliteral}{"{}\ \ ICM-\/20948\ |\ UNIT\ Electronics"{}}));}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00189}00189\ \ \ Serial.println(F(\textcolor{stringliteral}{"{}\ \ MODO\ VERIFICACION\ —\ FS=+-\/2g\ fijo,\ 3\ lecturas\ por\ config"{}}));}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00190}00190\ \ \ Serial.println(F(\textcolor{stringliteral}{"{}\ \ Sensor\ PLANO\ y\ QUIETO\ |\ Az\ esperado:\ \string~+1.000g"{}}));}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00191}00191\ \ \ \mbox{\hyperlink{test2_8ino_a42633dcf8fe2689c57c8113825f74c66}{printDobleLinea}}();}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00192}00192\ \ \ \textcolor{keywordflow}{for}(uint8\_t\ i\ =\ 0;\ i\ <\ \mbox{\hyperlink{test2_8ino_a0d5bdf34da5950970f04fcb4d629a48a}{N\_AVG}};\ i++)\{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00193}00193\ \ \ \ \ \textcolor{keywordflow}{for}(uint8\_t\ j\ =\ 0;\ j\ <\ \mbox{\hyperlink{test2_8ino_a6e9ca5bda437536b80c2d5b592629088}{N\_FS}};j++)\{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00194}00194\ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (uint8\_t\ d\ =\ 0;\ d\ <\ \mbox{\hyperlink{test2_8ino_a7a9c77b04f25920366c8b7b1e13d4854}{N\_DLPF}};\ d++)\ \{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00195}00195\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00196}00196\ \ \ \ \ \ \ \ \ \textcolor{comment}{//Serial.println();}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00197}00197\ \ \ \ \ \ \ \ \ \textcolor{comment}{//printLinea();}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00198}00198\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*Serial.printf("{}\ \ Config\ \%d/\%d:\ \%s\(\backslash\)n"{},\ d+1,\ N\_DLPF,\ configsDLPF[d].nombre);}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00199}00199\ \textcolor{comment}{\ \ \ \ \ \ \ \ Serial.printf("{}\ \ ODR=\%.1fHz\ |\ Periodo=\%.1fms\(\backslash\)n"{},}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00200}00200\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ configsDLPF[d].odr\_hz,}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00201}00201\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 1000.0f\ /\ configsDLPF[d].odr\_hz);*/}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00202}00202\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00203}00203\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ -\/-\/-\/\ FIX:\ aplicar\ la\ configuracion\ antes\ de\ leer\ -\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00204}00204\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ cfg\_ok\ =\ \mbox{\hyperlink{mag__test_8ino_af42a493b8d96759f43d866fbe725cf3d}{applySettings}}(j,\ \mbox{\hyperlink{test2_8ino_a9ef8fe0f793376a22cc3d83386c3b86a}{configsDLPF}}[d],i);\ \ \textcolor{comment}{//\ FS=0\ →\ +-\/2g}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00205}00205\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!cfg\_ok)\ \{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00206}00206\ \ \ \ \ \ \ \ \ \ \ Serial.println(F(\textcolor{stringliteral}{"{}\ \ ERROR:\ applySettings()\ fallo"{}}));}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00207}00207\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00208}00208\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00209}00209\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00210}00210\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Esperar\ que\ el\ filtro\ estabilice\ (10\ periodos\ del\ ODR,\ min\ 50ms)}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00211}00211\ \ \ \ \ \ \ \ \ uint32\_t\ settle\_ms\ =\ max((uint32\_t)(10000.0f\ /\ \mbox{\hyperlink{test2_8ino_a9ef8fe0f793376a22cc3d83386c3b86a}{configsDLPF}}[d].odr\_hz),}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00212}00212\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (uint32\_t)50);}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00213}00213\ \ \ \ \ \ \ \ \ delay(settle\_ms);}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00214}00214\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00215}00215\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Tomar\ 3\ lecturas\ espaciadas\ por\ el\ periodo\ del\ ODR}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00216}00216\ \ \ \ \ \ \ \ \ uint32\_t\ periodo\_ms\ =\ max((uint32\_t)(1000.0f\ /\ \mbox{\hyperlink{test2_8ino_a9ef8fe0f793376a22cc3d83386c3b86a}{configsDLPF}}[d].odr\_hz),}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00217}00217\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (uint32\_t)1);}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00218}00218\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ ax,\ ay,\ az;}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00219}00219\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (uint8\_t\ r\ =\ 0;\ r\ <\ 100;\ r++)\ \{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00220}00220\ \ \ \ \ \ \ \ \ \ \ n++;}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00221}00221\ \ \ \ \ \ \ \ \ \ \ delay(periodo\_ms);}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00222}00222\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{test2_8ino_aa8226278adaa3f7fb2ad8b966f7787a1}{imu}}.\mbox{\hyperlink{classDevLab__ICM20948_a3b58edd0915cff118ca81daa6944a27b}{readAccel}}(ax,\ ay,\ az))\ \{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00223}00223\ \ \ \ \ \ \ \ \ \ \ \ \ Serial.printf(\textcolor{stringliteral}{"{}\%d\ ;\ \%s\ ;\ \%s\ ;\ \%s\ ;\ \%+.4f\ ;\ \%+.4f\ ;\ \%+.4f\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00224}00224\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ n,}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00225}00225\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{test2_8ino_a9ef8fe0f793376a22cc3d83386c3b86a}{configsDLPF}}[d].nombre,\ \ \ \textcolor{comment}{//\ "{}246\ ;\ 265\ ;\ 1125"{}}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00226}00226\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{test2_8ino_a14ebfda2dc5c37c8a8080f828f9fecf8}{etiquetasAccelCfg}}[i],\ \ \ \ \ \textcolor{comment}{//\ "{}+-\/2G"{}}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00227}00227\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{test2_8ino_a1e7d1f7dded2d3dfeb778c3cfcc91dea}{etiquetasAccelAVG}}[j],\ \ \ \ \ \textcolor{comment}{//\ "{}8"{}}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00228}00228\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ax,\ ay,\ az);\ \ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00229}00229\ \ \ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00230}00230\ \ \ \ \ \ \ \ \ \ \ \ \ Serial.println(F(\textcolor{stringliteral}{"{}\ \ [?]\ readAccel()\ fallo"{}}));}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00231}00231\ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00232}00232\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00233}00233\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00234}00234\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00235}00235\ \ \ \}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00236}00236\ \ \ Serial.println();}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00237}00237\ \ \ \mbox{\hyperlink{test2_8ino_a42633dcf8fe2689c57c8113825f74c66}{printDobleLinea}}();}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00238}00238\ \ \ Serial.println(F(\textcolor{stringliteral}{"{}\ \ VERIFICACION\ COMPLETA"{}}));}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00239}00239\ \ \ Serial.println(F(\textcolor{stringliteral}{"{}\ \ Si\ Az\ \string~\ +1.0g\ en\ todos\ los\ bloques:"{}}));}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00240}00240\ \ \ Serial.println(F(\textcolor{stringliteral}{"{}\ \ el\ sensor\ funciona\ correctamente."{}}));}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00241}00241\ \ \ Serial.println(F(\textcolor{stringliteral}{"{}\ \ Activar\ sweep\ completo\ cuando\ este\ listo."{}}));}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00242}00242\ \ \ \mbox{\hyperlink{test2_8ino_a42633dcf8fe2689c57c8113825f74c66}{printDobleLinea}}();}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00243}00243\ \}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00244}00244\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00245}00245\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00246}00246\ \textcolor{comment}{//\ SETUP}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00247}00247\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00248}00248\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00249}00249\ \textcolor{comment}{\ *\ @brief\ Initialize\ I2C,\ reset/wake\ the\ IMU,\ enable\ sensors,\ and\ start\ sweep.}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00250}00250\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00251}\mbox{\hyperlink{test2_8ino_a4fc01d736fe50cf5b977f755b675f11d}{00251}}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{test2_8ino_a4fc01d736fe50cf5b977f755b675f11d}{setup}}()\ \{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00252}00252\ \ \ Serial.begin(115200);}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00253}00253\ \ \ delay(200);}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00254}00254\ \ \ Serial.println(F(\textcolor{stringliteral}{"{}ICM-\/20948\ —\ Verificacion"{}}));}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00255}00255\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00256}00256\ \ \ \mbox{\hyperlink{test2_8ino_a42633dcf8fe2689c57c8113825f74c66}{printDobleLinea}}();}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00257}00257\ \ \ Serial.println(F(\textcolor{stringliteral}{"{}\ \ ICM-\/20948\ VALIDACION\ ACELEROMETRO"{}}));}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00258}00258\ \ \ \mbox{\hyperlink{test2_8ino_a42633dcf8fe2689c57c8113825f74c66}{printDobleLinea}}();}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00259}00259\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00260}00260\ \ \ Wire.begin(\mbox{\hyperlink{test2_8ino_a526d580d324bce60a3e964066fae77e3}{SDA\_PIN}},\ \mbox{\hyperlink{test2_8ino_a06c967e78bcedcee909a70764f879433}{SCL\_PIN}});}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00261}00261\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00262}00262\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{test2_8ino_aa8226278adaa3f7fb2ad8b966f7787a1}{imu}}.\mbox{\hyperlink{classDevLab__ICM20948_a91147b3cd4c45bffc8e024f985be7b21}{beginI2C}}(\mbox{\hyperlink{test2_8ino_a8fb98755bd25ab9d5bf8739e15df6eeb}{ICM\_ADDR}},\ Wire,\ \mbox{\hyperlink{test2_8ino_a8b7500a141450a9df212017430c0df9e}{I2C\_FREQ}}))\ \{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00263}00263\ \ \ \ \ Serial.println(F(\textcolor{stringliteral}{"{}ERROR:\ beginI2C()\ fallo"{}}));}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00264}00264\ \ \ \ \ \textcolor{keywordflow}{while}\ (1)\ delay(200);}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00265}00265\ \ \ \}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00266}00266\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00267}00267\ \ \ \mbox{\hyperlink{test2_8ino_a1cf9f29034d9373db6498335da3d661c}{firstStage}}();}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00268}00268\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00269}00269\ \ \ \textcolor{comment}{//\ softReset\ pone\ el\ chip\ a\ dormir}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00270}00270\ \ \ \textcolor{comment}{//\ Despues\ del\ reset\ hay\ que\ despertar\ el\ dispositivo}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00271}00271\ \ \ \mbox{\hyperlink{test2_8ino_aa8226278adaa3f7fb2ad8b966f7787a1}{imu}}.\mbox{\hyperlink{classDevLab__ICM20948_a0d6774b76298645ee45ec0e9065a8891}{softReset}}();}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00272}00272\ \ \ delay(100);}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00273}00273\ \ \ \mbox{\hyperlink{test2_8ino_aa8226278adaa3f7fb2ad8b966f7787a1}{imu}}.\mbox{\hyperlink{classDevLab__ICM20948_a4210e842050486637a5967b2a9ef7b57}{sleep}}(\textcolor{keyword}{false});\ \ \ \textcolor{comment}{//\ limpia\ SLEEP\ bit,\ CLKSEL=1}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00274}00274\ \ \ delay(50);}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00275}00275\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00276}00276\ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{test2_8ino_aa8226278adaa3f7fb2ad8b966f7787a1}{imu}}.\mbox{\hyperlink{classDevLab__ICM20948_ae9c088334d6ec706bb08b47ef29bd186}{setSensors}}(\textcolor{keyword}{true},\ \textcolor{keyword}{true},\ \textcolor{keyword}{true}))\ \{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00277}00277\ \ \ \ \ Serial.println(F(\textcolor{stringliteral}{"{}ERROR:\ setSensors()\ fallo"{}}));}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00278}00278\ \ \ \}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00279}00279\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00280}00280\ \ \ Serial.println(F(\textcolor{stringliteral}{"{}\ \ Sensor\ listo.\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00281}00281\ \ \ Serial.println(F(\textcolor{stringliteral}{"{}\ \ Sensor\ PLANO\ y\ QUIETO\ sobre\ la\ mesa."{}}));}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00282}00282\ \ \ Serial.println(F(\textcolor{stringliteral}{"{}\ \ Iniciando\ en\ 5\ segundos..."{}}));}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00283}00283\ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ i\ =\ 5;\ i\ >\ 0;\ i-\/-\/)\ \{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00284}00284\ \ \ \ \ Serial.printf(\textcolor{stringliteral}{"{}\ \ \%d...\(\backslash\)n"{}},\ i);}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00285}00285\ \ \ \ \ delay(1000);}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00286}00286\ \ \ \}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00287}00287\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00288}00288\ \ \ \textcolor{comment}{//for\ (int\ runs\ =\ 0;\ runs\ <\ 20\ ;\ runs++)\{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00289}00289\ \ \ \ \ \mbox{\hyperlink{test2_8ino_a59a0400232b9ffe7d4395b166f74593a}{runSweep}}();}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00290}00290\ \ \ \textcolor{comment}{//\}}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00291}00291\ \}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00292}00292\ }
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00293}00293\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00294}00294\ \textcolor{comment}{//\ LOOP\ —\ lectura\ simple\ post-\/sweep}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00295}00295\ \textcolor{comment}{//\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00296}00296\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00297}00297\ \textcolor{comment}{\ *\ @brief\ Optional\ post-\/sweep\ loop\ for\ manual\ accelerometer\ reads.}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00298}00298\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00299}\mbox{\hyperlink{test2_8ino_afe461d27b9c48d5921c00d521181f12f}{00299}}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{test2_8ino_afe461d27b9c48d5921c00d521181f12f}{loop}}()\ \{}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00300}00300\ \ \ \textcolor{comment}{/*float\ ax,\ ay,\ az;}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00301}00301\ \textcolor{comment}{\ \ if\ (imu.readAccel(ax,\ ay,\ az))\ \{}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00302}00302\ \textcolor{comment}{\ \ \ \ Serial.printf("{}X:\%+.3f\ \ Y:\%+.3f\ \ Z:\%+.3f\(\backslash\)n"{},\ ax,\ ay,\ az);}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00303}00303\ \textcolor{comment}{\ \ \}}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00304}00304\ \textcolor{comment}{\ \ delay(500);*/}}
\DoxyCodeLine{\Hypertarget{test2_8ino_source_l00305}00305\ \}}

\end{DoxyCode}
