diff --git a/Datalogging-Part-4,-Java-Learning-Exercise.md b/Datalogging-Part-4,-Java-Learning-Exercise.md index 7b6620b..90a589d 100644 --- a/Datalogging-Part-4,-Java-Learning-Exercise.md +++ b/Datalogging-Part-4,-Java-Learning-Exercise.md @@ -9,7 +9,7 @@ It's provided here strictly as a **Java learning exercise**, and **does not requ Like the class in Parts 1 and 2, this one lets you **store live robot data** in a dedicated log file on the RC device, and download to a computer for **spreadsheet** evaluation and charting.
-

[[/images/hub-and-chart.png|hub-and-chart]] +

[[/images/Datalogging-4/010-hub-and-chart.png|010-hub-and-chart]] Datalogging has long been available in the Education version of LEGO Mindstorms software, used by FIRST LEGO League teams. @@ -52,7 +52,7 @@ Data can accumulate and change rapidly, often too fast for detailed evaluation f - Import and evaluate the data in a spreadsheet
-

[[/images/Datalogs-folder-circled.png|Datalogs-folder-circled]] +

[[/images/Datalogging-4/020-Datalogs-folder-circled.png|020-Datalogs-folder-circled]] [

Return to Top](#introduction)

@@ -253,7 +253,7 @@ For simplicity, this example uses a REV Control Hub or Expansion Hub with no con Testing this OpMode can be done by simply rotating the Hub by hand, then looking at the **line graph** of the heading angle.
-

[[/images/hub-and-chart.png|hub-and-chart]] +

[[/images/Datalogging-4/010-hub-and-chart.png|010-hub-and-chart]] The OpMode's **key lines of code** are described here in seven sections. @@ -423,7 +423,7 @@ The sample Java class "Datalogger" stores log files in the folder `/sdcard/FIRST **Refresh the Chrome browser**, to update the folder listing. Click on a datalog filename to see its contents. -

[[/images/Datalogs-folder-circled.png|Datalogs-folder-circled]] +

[[/images/Datalogging-4/020-Datalogs-folder-circled.png|020-Datalogs-folder-circled]] Right-click on a log file, and choose "Download". **During the download dialog**, navigate to your target folder on the laptop, and **change the file extension from `.txt` to `.csv`**. This change allows the file to be automatically recognized and imported by spreadsheet programs. @@ -447,13 +447,13 @@ On the computer, double-clicking the CSV filename may automatically open it in t The file will open, showing several columns and many rows of data. Click on the column heading (letter C or D) over "IMU Heading Angle"; this is the data to be charted. -

[[/images/Excel-01-marked.png|Excel-01-marked]] +

[[/images/Datalogging-4/030-Excel-01-marked.png|030-Excel-01-marked]] Click the top menu item "Insert", circled above in yellow. Then click on the icon for charts (see green arrow). Then click the basic 2-D Line style, circled in yellow. This will insert a simple line graph of the IMU heading data, as shown below. -

[[/images/Excel-02-orig.png|Excel-02-orig]] +

[[/images/Datalogging-4/040-Excel-02-orig.png|040-Excel-02-orig]] **That's it!** You have successfully stored and charted data from an FTC robot. @@ -469,23 +469,23 @@ Excel offers many more data evaluation features, beyond the scope of this tutori In the Chrome browser, type "sheets.google.com". Then click the large **plus sign** in the lower right corner, as shown below. -

[[/images/Sheets-01-marked.png|Sheets-01-marked]] +

[[/images/Datalogging-4/050-Sheets-01-marked.png|050-Sheets-01-marked]] This creates and opens a new untitled spreadsheet. As shown below in yellow, click "File", then "Import". Then click "Upload". -

[[/images/Sheets-02-marked.png|Sheets-02-marked]] +

[[/images/Datalogging-4/060-Sheets-02-marked.png|060-Sheets-02-marked]] Drag the CSV data file from Windows Explorer to the rectangle shown, or click the blue "Select a file.." box to manually find and select the CSV data file. For this example, the default settings are good, as shown by the yellow check-marks below. Click "Import data". -

[[/images/Sheets-03-marked.png|Sheets-03-marked]] +

[[/images/Datalogging-4/070-Sheets-03-marked.png|070-Sheets-03-marked]] The file will open, showing several columns and many rows of data. Click on the column heading (letter C or D) over "IMU Heading Angle"; this is the data to be charted. As shown below, click "Insert", then "Chart". This will insert a simple line graph of the IMU heading data, as shown below. -

[[/images/Sheets-04-marked.png|Sheets-04-marked]] +

[[/images/Datalogging-4/080-Sheets-04-marked.png|080-Sheets-04-marked]] **That's it!** You have successfully stored and charted data from an FTC robot.